diff --git a/sgawebsite/manage.py b/manage.py
similarity index 100%
rename from sgawebsite/manage.py
rename to manage.py
diff --git a/sgawebsite/__init__.py b/sgawebsite/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/sgawebsite/apps/__init__.py b/sgawebsite/apps/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/sgawebsite/apps/main/urls.py b/sgawebsite/apps/main/urls.py
new file mode 100644
index 0000000..1d7e9c2
--- /dev/null
+++ b/sgawebsite/apps/main/urls.py
@@ -0,0 +1,9 @@
+from django.conf.urls import url
+
+from .views import *
+
+urlpatterns = [
+ url(r'^$', index, name='index'),
+ url(r'about', about, name='about'),
+
+]
diff --git a/sgawebsite/apps/main/views.py b/sgawebsite/apps/main/views.py
index acf40c6..1b46a74 100644
--- a/sgawebsite/apps/main/views.py
+++ b/sgawebsite/apps/main/views.py
@@ -1,14 +1,7 @@
from django.shortcuts import render
-@app.route("/")
-def index():
- announcements = Announcement.query.all()
- return render_template(
- "index.html",
- prefix=ROOT_URL,
- announcements=announcements)
+def index(request):
+ return render(request, "index.html")
-# Create your views here.
-
-def index():
- return
+def about(request):
+ return render(request, "about.html")
diff --git a/sgawebsite/sgawebsite/example_settings.py b/sgawebsite/example_settings.py
similarity index 97%
rename from sgawebsite/sgawebsite/example_settings.py
rename to sgawebsite/example_settings.py
index 4cf951a..d35834e 100644
--- a/sgawebsite/sgawebsite/example_settings.py
+++ b/sgawebsite/example_settings.py
@@ -37,6 +37,9 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+ 'sgawebsite',
+ 'sgawebsite.apps',
+ 'sgawebsite.apps.main'
]
MIDDLEWARE = [
diff --git a/sgawebsite/sgawebsite/__pycache__/__init__.cpython-36.pyc b/sgawebsite/sgawebsite/__pycache__/__init__.cpython-36.pyc
deleted file mode 100644
index 08cf76b..0000000
Binary files a/sgawebsite/sgawebsite/__pycache__/__init__.cpython-36.pyc and /dev/null differ
diff --git a/sgawebsite/sgawebsite/__pycache__/settings.cpython-36.pyc b/sgawebsite/sgawebsite/__pycache__/settings.cpython-36.pyc
deleted file mode 100644
index de2beeb..0000000
Binary files a/sgawebsite/sgawebsite/__pycache__/settings.cpython-36.pyc and /dev/null differ
diff --git a/sgawebsite/sgawebsite/settings.py b/sgawebsite/sgawebsite/settings.py
deleted file mode 100644
index 473f90b..0000000
--- a/sgawebsite/sgawebsite/settings.py
+++ /dev/null
@@ -1,124 +0,0 @@
-"""
-Django settings for sgawebsite project.
-
-Generated by 'django-admin startproject' using Django 1.11.5.
-
-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 = '#6676vzm14drh2_a%yfywjd(k@p6btn(j#y9u1dyt9g-(8m-3-'
-
-# 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',
-]
-
-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 = 'sgawebsite.urls'
-
-TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
- '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 = 'sgawebsite.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, 'static'),
-]
-LOGIN_REDIRECT_URL = '/'
diff --git a/sgawebsite/templates/head.html b/sgawebsite/templates/head.html
index 322a330..9249f99 100644
--- a/sgawebsite/templates/head.html
+++ b/sgawebsite/templates/head.html
@@ -1,3 +1,4 @@
+{% load static %}
@@ -5,7 +6,7 @@
-
-
-
-
+
+
+
+
diff --git a/sgawebsite/templates/header.html b/sgawebsite/templates/header.html
index 8aa427e..b829232 100644
--- a/sgawebsite/templates/header.html
+++ b/sgawebsite/templates/header.html
@@ -1,3 +1,4 @@
+{% load static %}
- {% include footer.html %}
+ {% include 'footer.html' %}
diff --git a/sgawebsite/sgawebsite/urls.py b/sgawebsite/urls.py
similarity index 87%
rename from sgawebsite/sgawebsite/urls.py
rename to sgawebsite/urls.py
index d130071..38f3eb6 100644
--- a/sgawebsite/sgawebsite/urls.py
+++ b/sgawebsite/urls.py
@@ -13,9 +13,11 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
-from django.conf.urls import url
+from django.conf.urls import include, url
from django.contrib import admin
+from .apps.main import urls as main
urlpatterns = [
url(r'^admin/', admin.site.urls),
+ url(r'^', include(main))
]
diff --git a/sgawebsite/sgawebsite/wsgi.py b/sgawebsite/wsgi.py
similarity index 100%
rename from sgawebsite/sgawebsite/wsgi.py
rename to sgawebsite/wsgi.py