diff --git a/djangonautic/accounts/__init__.py b/djangonautic/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangonautic/accounts/admin.py b/djangonautic/accounts/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/djangonautic/accounts/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/djangonautic/accounts/apps.py b/djangonautic/accounts/apps.py new file mode 100644 index 0000000..9b3fc5a --- /dev/null +++ b/djangonautic/accounts/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + name = 'accounts' diff --git a/djangonautic/accounts/migrations/__init__.py b/djangonautic/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangonautic/accounts/models.py b/djangonautic/accounts/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/djangonautic/accounts/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/djangonautic/accounts/templates/accounts/login.html b/djangonautic/accounts/templates/accounts/login.html new file mode 100644 index 0000000..1a50d6e --- /dev/null +++ b/djangonautic/accounts/templates/accounts/login.html @@ -0,0 +1,14 @@ +{% extends 'base_layout.html' %} + +{% block content %} +

Log in

+
+ {% csrf_token %} + {{ form }} + {% if request.GET.next %} + + {% endif %} + +
+

Not got an account? Sign Up

+{% endblock %} diff --git a/djangonautic/accounts/templates/accounts/signup.html b/djangonautic/accounts/templates/accounts/signup.html new file mode 100644 index 0000000..6dfdb81 --- /dev/null +++ b/djangonautic/accounts/templates/accounts/signup.html @@ -0,0 +1,10 @@ +{% extends 'base_layout.html' %} + +{% block content %} +

Signup

+
+ {% csrf_token %} + {{ form }} + +
+{% endblock %} diff --git a/djangonautic/accounts/tests.py b/djangonautic/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/djangonautic/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/djangonautic/accounts/urls.py b/djangonautic/accounts/urls.py new file mode 100644 index 0000000..5ac0941 --- /dev/null +++ b/djangonautic/accounts/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls import url +from . import views + +app_name = 'accounts' + +urlpatterns = [ + url(r'^signup/$', views.signup_view, name="signup"), + url(r'^login/$', views.login_view, name="login"), + url(r'^logout/$', views.logout_view, name="logout"), +] diff --git a/djangonautic/accounts/views.py b/djangonautic/accounts/views.py new file mode 100644 index 0000000..53ca90f --- /dev/null +++ b/djangonautic/accounts/views.py @@ -0,0 +1,35 @@ +from django.shortcuts import render, redirect +from django.contrib.auth.forms import UserCreationForm, AuthenticationForm +from django.contrib.auth import login, logout + +def signup_view(request): + if request.method == 'POST': + form = UserCreationForm(request.POST) + if form.is_valid(): + user = form.save() + # log the user in + login(request, user) + return redirect('articles:list') + else: + form = UserCreationForm() + return render(request, 'accounts/signup.html', { 'form': form }) + +def login_view(request): + if request.method == 'POST': + form = AuthenticationForm(data=request.POST) + if form.is_valid(): + # log the user in + user = form.get_user() + login(request, user) + if 'next' in request.POST: + return redirect(request.POST.get('next')) + else: + return redirect('articles:list') + else: + form = AuthenticationForm() + return render(request, 'accounts/login.html', { 'form': form }) + +def logout_view(request): + if request.method == 'POST': + logout(request) + return redirect('articles:list') diff --git a/djangonautic/articles/__init__.py b/djangonautic/articles/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangonautic/articles/admin.py b/djangonautic/articles/admin.py new file mode 100644 index 0000000..6b05644 --- /dev/null +++ b/djangonautic/articles/admin.py @@ -0,0 +1,4 @@ +from django.contrib import admin +from .models import Article + +admin.site.register(Article) diff --git a/djangonautic/articles/apps.py b/djangonautic/articles/apps.py new file mode 100644 index 0000000..bc12dfb --- /dev/null +++ b/djangonautic/articles/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ArticlesConfig(AppConfig): + name = 'articles' diff --git a/djangonautic/articles/forms.py b/djangonautic/articles/forms.py new file mode 100644 index 0000000..d2580bc --- /dev/null +++ b/djangonautic/articles/forms.py @@ -0,0 +1,7 @@ +from django import forms +from . import models + +class CreateArticle(forms.ModelForm): + class Meta: + model = models.Article + fields = ['title', 'body', 'slug', 'thumb',] diff --git a/djangonautic/articles/migrations/0001_initial.py b/djangonautic/articles/migrations/0001_initial.py new file mode 100644 index 0000000..47c4018 --- /dev/null +++ b/djangonautic/articles/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-11-10 10:23 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Article', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=100)), + ('slug', models.SlugField()), + ('body', models.TextField()), + ('date', models.DateTimeField(auto_now_add=True)), + ], + ), + ] diff --git a/djangonautic/articles/migrations/0002_article_thumb.py b/djangonautic/articles/migrations/0002_article_thumb.py new file mode 100644 index 0000000..2816d83 --- /dev/null +++ b/djangonautic/articles/migrations/0002_article_thumb.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-11-12 08:31 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('articles', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='article', + name='thumb', + field=models.ImageField(blank=True, default='/media/default.png', upload_to=''), + ), + ] diff --git a/djangonautic/articles/migrations/0003_auto_20171112_0905.py b/djangonautic/articles/migrations/0003_auto_20171112_0905.py new file mode 100644 index 0000000..2a95994 --- /dev/null +++ b/djangonautic/articles/migrations/0003_auto_20171112_0905.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-11-12 09:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('articles', '0002_article_thumb'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='thumb', + field=models.ImageField(blank=True, default='default.png', upload_to=''), + ), + ] diff --git a/djangonautic/articles/migrations/0004_article_author.py b/djangonautic/articles/migrations/0004_article_author.py new file mode 100644 index 0000000..4476732 --- /dev/null +++ b/djangonautic/articles/migrations/0004_article_author.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-11-13 16:02 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('articles', '0003_auto_20171112_0905'), + ] + + operations = [ + migrations.AddField( + model_name='article', + name='author', + field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/djangonautic/articles/migrations/__init__.py b/djangonautic/articles/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangonautic/articles/models.py b/djangonautic/articles/models.py new file mode 100644 index 0000000..aee5b34 --- /dev/null +++ b/djangonautic/articles/models.py @@ -0,0 +1,17 @@ +from django.db import models +from django.contrib.auth.models import User + +# Create your models here. +class Article(models.Model): + title = models.CharField(max_length=100) + slug = models.SlugField() + body = models.TextField() + date = models.DateTimeField(auto_now_add=True) + thumb = models.ImageField(default='default.png', blank=True) + author = models.ForeignKey(User, default=None) + + def __str__(self): + return self.title + + def snippet(self): + return self.body[:50] + '...' diff --git a/djangonautic/articles/templates/articles/article_create.html b/djangonautic/articles/templates/articles/article_create.html new file mode 100644 index 0000000..bbdd665 --- /dev/null +++ b/djangonautic/articles/templates/articles/article_create.html @@ -0,0 +1,13 @@ +{% extends 'base_layout.html' %} + +{% block content %} +
+

Create an Awesome New Article

+
+ {% csrf_token %} + {{ form }} + +
+
+ +{% endblock %} diff --git a/djangonautic/articles/templates/articles/article_detail.html b/djangonautic/articles/templates/articles/article_detail.html new file mode 100644 index 0000000..5c81cee --- /dev/null +++ b/djangonautic/articles/templates/articles/article_detail.html @@ -0,0 +1,13 @@ +{% extends 'base_layout.html' %} + +{% block content %} +
+
+ +

{{ article.title }}

+

Written by {{ article.author.username }}

+

{{ article.body }}

+

{{ article.date }}

+
+
+{% endblock %} diff --git a/djangonautic/articles/templates/articles/article_list.html b/djangonautic/articles/templates/articles/article_list.html new file mode 100644 index 0000000..91d5d9e --- /dev/null +++ b/djangonautic/articles/templates/articles/article_list.html @@ -0,0 +1,15 @@ +{% extends 'base_layout.html' %} + +{% block content%} +

Articles List

+
+ {% for article in articles %} +
+

{{ article.title }}

+

{{ article.snippet }}

+

{{ article.date }}

+

added by {{ article.author.username }}

+
+ {% endfor %} +
+{% endblock %} diff --git a/djangonautic/articles/tests.py b/djangonautic/articles/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/djangonautic/articles/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/djangonautic/articles/urls.py b/djangonautic/articles/urls.py new file mode 100644 index 0000000..72126e6 --- /dev/null +++ b/djangonautic/articles/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls import url +from . import views + +app_name = 'articles' + +urlpatterns = [ + url(r'^$', views.article_list, name="list"), + url(r'^create/$', views.article_create, name="create"), + url(r'^(?P[\w-]+)/$', views.article_detail, name="detail"), +] diff --git a/djangonautic/articles/views.py b/djangonautic/articles/views.py new file mode 100644 index 0000000..75925fe --- /dev/null +++ b/djangonautic/articles/views.py @@ -0,0 +1,28 @@ +from django.http import HttpResponse +from django.shortcuts import render, redirect +from .models import Article +from django.contrib.auth.decorators import login_required +from . import forms + +def article_list(request): + articles = Article.objects.all().order_by('date'); + return render(request, 'articles/article_list.html', { 'articles': articles }) + +def article_detail(request, slug): + # return HttpResponse(slug) + article = Article.objects.get(slug=slug) + return render(request, 'articles/article_detail.html', { 'article': article }) + +@login_required(login_url="/accounts/login/") +def article_create(request): + if request.method == 'POST': + form = forms.CreateArticle(request.POST, request.FILES) + if form.is_valid(): + # save article to db + instance = form.save(commit=False) + instance.author = request.user + instance.save() + return redirect('articles:list') + else: + form = forms.CreateArticle() + return render(request, 'articles/article_create.html', { 'form': form }) diff --git a/djangonautic/assets/logo.png b/djangonautic/assets/logo.png new file mode 100644 index 0000000..2e23864 Binary files /dev/null and b/djangonautic/assets/logo.png differ diff --git a/djangonautic/assets/slugify.js b/djangonautic/assets/slugify.js new file mode 100644 index 0000000..a25cb3c --- /dev/null +++ b/djangonautic/assets/slugify.js @@ -0,0 +1,14 @@ +const titleInput = document.querySelector('input[name=title]'); +const slugInput = document.querySelector('input[name=slug]'); + +const slugify = (val) => { + + return val.toString().toLowerCase().trim() + .replace(/&/g, '-and-') // Replace & with 'and' + .replace(/[\s\W-]+/g, '-') // Replace spaces, non-word characters and dashes with a single dash (-) + +}; + +titleInput.addEventListener('keyup', (e) => { + slugInput.setAttribute('value', slugify(titleInput.value)); +}); diff --git a/djangonautic/assets/stars.png b/djangonautic/assets/stars.png new file mode 100644 index 0000000..8bb3bf8 Binary files /dev/null and b/djangonautic/assets/stars.png differ diff --git a/djangonautic/assets/styles.css b/djangonautic/assets/styles.css new file mode 100644 index 0000000..536ea4a --- /dev/null +++ b/djangonautic/assets/styles.css @@ -0,0 +1,151 @@ +body{ + background-color: #0f121f; + background-image: url(/static/stars.png); + background-repeat-y: no-repeat; + color: #fff; +} + +body *{ + font-family: Ubuntu; +} + +h1, h2, h3, h4, h5{ + font-weight: normal; + margin: 0; +} + +a, a:hover, a:visited{ + color: #fff; + text-decoration: none; +} + +.wrapper{ + max-width: 960px; + margin: 0 auto; +} + +div.wrapper > h1{ + text-align: center; + margin: 100px auto; + font-size: 2.4em +} + +header{ + display: grid; + grid-template-columns: 1fr 1fr; + padding: 20px 0; +} + +nav{ + justify-self: end; +} + +nav li{ + display: inline-block; + list-style-type: none; + margin-left: 20px; +} + +nav button{ + background: none; + color: #fff; + cursor: pointer; + border: 0; + font-size: 16px; +} + +.articles{ + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-gap: 30px; +} + +.article{ + padding: 10px; + border: 1px solid #00dba0; + position: relative; + padding-bottom: 40px; +} + +.article h2{ + font-size: 1.2em; +} + +.article .author{ + padding: 10px; + background: #00dba0; + position: absolute; + right: 0; + bottom: 0; + margin: 0; + color: #0f121f; +} + +.article-detail .article{ + padding: 0; +} + +.article-detail .article img{ + max-width: 100%; +} + +.article-detail .article h2{ + text-align: center; + margin: 20px auto; + font-size: 2em +} + +.article-detail .article h3{ + text-align: center; +} + +.article-detail .article p{ + margin: 10px 20px +} + +.site-form { + margin-top: 60px; + border: 1px solid #00dba0; + padding: 20px; +} + +.site-form input, .site-form textarea{ + display: block; + margin: 20px 0 0px 0; + padding: 10px; +} + +a.highlight{ + border: 1px solid #00dba0; + padding: 10px; + border-radius: 4px; + color: #00dba0; +} + +.helptext, .helptext ul{ + margin: 0 auto 20px; + color: #bbb; + font-size: 14px; + display: block; +} + +.errorlist li{ + padding: 10px; + list-style-type: none; + border: 1px solid #FF5722; + margin: 10px 0; + color: #FF5722 +} + +.errorlist{ + padding: 0; +} + +.site-form input[type="submit"]{ + background: #00dba0; + border: 0; + color: #fff; + font-size: 20px; + border-radius: 4px; + margin: 10px 0; +} diff --git a/djangonautic/db.sqlite3 b/djangonautic/db.sqlite3 new file mode 100644 index 0000000..b973f10 Binary files /dev/null and b/djangonautic/db.sqlite3 differ diff --git a/djangonautic/djangonautic/__init__.py b/djangonautic/djangonautic/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djangonautic/djangonautic/settings.py b/djangonautic/djangonautic/settings.py new file mode 100644 index 0000000..47960cb --- /dev/null +++ b/djangonautic/djangonautic/settings.py @@ -0,0 +1,128 @@ +""" +Django settings for djangonautic project. + +Generated by 'django-admin startproject' using Django 1.11.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'v=q4mi9r6zuq8fg3ej-nrt)pt6h$jm^y)$wo))+d^&c&f2i#&n' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'articles', + 'accounts', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'djangonautic.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': ['templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'djangonautic.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' +STATICFILES_DIRS = ( + os.path.join(BASE_DIR, 'assets'), +) + +MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') diff --git a/djangonautic/djangonautic/urls.py b/djangonautic/djangonautic/urls.py new file mode 100644 index 0000000..947c4d5 --- /dev/null +++ b/djangonautic/djangonautic/urls.py @@ -0,0 +1,18 @@ +from django.conf.urls import url, include +from django.contrib import admin +from . import views +from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.conf.urls.static import static +from django.conf import settings +from articles import views as article_views + +urlpatterns = [ + url(r'^admin/', admin.site.urls), + url(r'^articles/', include('articles.urls')), + url(r'^accounts/', include('accounts.urls')), + url(r'^about/$', views.about), + url(r'^$', article_views.article_list, name="home"), +] + +urlpatterns += staticfiles_urlpatterns() +urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/djangonautic/djangonautic/views.py b/djangonautic/djangonautic/views.py new file mode 100644 index 0000000..6021147 --- /dev/null +++ b/djangonautic/djangonautic/views.py @@ -0,0 +1,10 @@ +from django.http import HttpResponse +from django.shortcuts import render + +def homepage(request): + # return HttpResponse('homepage') + return render(request, 'homepage.html') + +def about(request): + # return HttpResponse('about') + return render(request, 'about.html') diff --git a/djangonautic/djangonautic/wsgi.py b/djangonautic/djangonautic/wsgi.py new file mode 100644 index 0000000..d5c2d78 --- /dev/null +++ b/djangonautic/djangonautic/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for djangonautic project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangonautic.settings") + +application = get_wsgi_application() diff --git a/djangonautic/manage.py b/djangonautic/manage.py new file mode 100644 index 0000000..46ad651 --- /dev/null +++ b/djangonautic/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangonautic.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/djangonautic/media/1.png b/djangonautic/media/1.png new file mode 100644 index 0000000..bf0bc30 Binary files /dev/null and b/djangonautic/media/1.png differ diff --git a/djangonautic/media/1_4RoiyWn.png b/djangonautic/media/1_4RoiyWn.png new file mode 100644 index 0000000..bf0bc30 Binary files /dev/null and b/djangonautic/media/1_4RoiyWn.png differ diff --git a/djangonautic/media/2.png b/djangonautic/media/2.png new file mode 100644 index 0000000..d182030 Binary files /dev/null and b/djangonautic/media/2.png differ diff --git a/djangonautic/media/3.png b/djangonautic/media/3.png new file mode 100644 index 0000000..9427c7f Binary files /dev/null and b/djangonautic/media/3.png differ diff --git a/djangonautic/media/5.png b/djangonautic/media/5.png new file mode 100644 index 0000000..3f2ce56 Binary files /dev/null and b/djangonautic/media/5.png differ diff --git a/djangonautic/media/6.png b/djangonautic/media/6.png new file mode 100644 index 0000000..c02087a Binary files /dev/null and b/djangonautic/media/6.png differ diff --git a/djangonautic/media/default.png b/djangonautic/media/default.png new file mode 100644 index 0000000..9e33a84 Binary files /dev/null and b/djangonautic/media/default.png differ diff --git a/djangonautic/templates/about.html b/djangonautic/templates/about.html new file mode 100644 index 0000000..336df27 --- /dev/null +++ b/djangonautic/templates/about.html @@ -0,0 +1,8 @@ +{% extends 'base_layout.html' %} + +{% block content %} +
+

About Us

+

We like django.

+
+{% endblock %} diff --git a/djangonautic/templates/base_layout.html b/djangonautic/templates/base_layout.html new file mode 100644 index 0000000..7bf7a58 --- /dev/null +++ b/djangonautic/templates/base_layout.html @@ -0,0 +1,34 @@ +{% load static from staticfiles %} + + + + + Djangonauts + + + +
+

djangonautic

+ +
+
+ {% block content %} + {% endblock %} +
+ +