From d91898ff73cc296697e2fc4db15614842c4ca8b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?=
Date: Mon, 8 Feb 2016 22:40:50 +0100
Subject: [PATCH] - Upgrading to django 1.9.x - Disabling apps for now - Fix
some frontpage text - Add env.dist for an .env example - Adjust
django-environ setup - Add vim swap files to gitignore
---
.gitignore | 1 +
bornhack/settings/base.py | 5 +-
bornhack/settings/env.dist | 3 ++
bornhack/settings/production.py | 9 ++--
bornhack/templates/frontpage.html | 21 ++++----
bornhack/urls.py | 82 ++++++++++++++++---------------
requirements/base.txt | 5 +-
7 files changed, 65 insertions(+), 61 deletions(-)
create mode 100644 bornhack/settings/env.dist
diff --git a/.gitignore b/.gitignore
index 30afe33a..a7376841 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.idea/
__pycache__/
db.sqlite3
+*.sw*
diff --git a/bornhack/settings/base.py b/bornhack/settings/base.py
index 3776da51..3252a30f 100644
--- a/bornhack/settings/base.py
+++ b/bornhack/settings/base.py
@@ -13,7 +13,6 @@ ROOT_URLCONF = 'bornhack.urls'
SITE_ID = 1
INSTALLED_APPS = [
- 'flat',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@@ -26,8 +25,8 @@ INSTALLED_APPS = [
'allauth.account',
'bootstrap3',
- 'profiles',
- 'camps',
+ # 'profiles',
+ # 'camps',
]
STATIC_URL = '/static/'
diff --git a/bornhack/settings/env.dist b/bornhack/settings/env.dist
new file mode 100644
index 00000000..eec1f201
--- /dev/null
+++ b/bornhack/settings/env.dist
@@ -0,0 +1,3 @@
+DATABASE_URL=postgres://username:password@host:port/database
+SECRET_KEY=somethingverysecretandunique
+ALLOWED_HOSTS=a,seperated,list,without,spaces
diff --git a/bornhack/settings/production.py b/bornhack/settings/production.py
index d4befb65..99e1600e 100644
--- a/bornhack/settings/production.py
+++ b/bornhack/settings/production.py
@@ -1,14 +1,13 @@
from .base import *
import environ
-env = environ.Env(
- ENGINE='django.db.backends.postgres_psycopg2',
-)
+env = environ.Env()
+
environ.Env.read_env()
-SECRET_KEY = env('SECRET_KEY')
DEBUG = False
-ALLOWED_HOSTS = env('ALLOWED_HOSTS')
+SECRET_KEY = env('SECRET_KEY')
+ALLOWED_HOSTS = env('ALLOWED_HOSTS').split(',')
DATABASES = {
'default': env.db(),
diff --git a/bornhack/templates/frontpage.html b/bornhack/templates/frontpage.html
index 5e437be8..743d2538 100644
--- a/bornhack/templates/frontpage.html
+++ b/bornhack/templates/frontpage.html
@@ -25,12 +25,13 @@
- We hope you will show your interest by signing up such that you
- can help us understand what you think would be fun.
- This is a new event, so we don't yet know exactly where this is
- going - but give us your feedback and you can help us form this.
- We are also on IRC at #bornhack on irc.freenode.net where you are
- always welcome.
+ We hope you will show your interest by signing onto our mailing-list as
+ soon as we get it up. In the meantime you are very much welcome to ask
+ questions and show your interest on IRC at #bornhack on irc.freenode.net
+ such that you can help us understand what you
+ think would be fun to do. This is a new event, so we don't yet
+ know exactly where this is going - but give us your feedback and
+ you can help us form it.
@@ -43,10 +44,10 @@
The Bornhack Team
-
- Signup for more info
-
+{# #}
+{# Signup for more info #}
+{# #}
diff --git a/bornhack/urls.py b/bornhack/urls.py
index 5326b1af..b407f28d 100644
--- a/bornhack/urls.py
+++ b/bornhack/urls.py
@@ -1,9 +1,11 @@
-from allauth.account.views import (
- SignupView,
- LoginView,
- LogoutView,
- ConfirmEmailView,
- EmailVerificationSentView, PasswordResetView)
+# from allauth.account.views import (
+# SignupView,
+# LoginView,
+# LogoutView,
+# ConfirmEmailView,
+# EmailVerificationSentView,
+# PasswordResetView
+# )
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
@@ -14,40 +16,40 @@ urlpatterns = [
TemplateView.as_view(template_name='frontpage.html'),
name='frontpage'
),
- url(
- r'^login/$',
- LoginView.as_view(),
- name='account_login',
- ),
- url(
- r'^logout/$',
- LogoutView.as_view(),
- name='account_logout',
- ),
- url(
- r'^confirm/(?P\S+)$',
- ConfirmEmailView.as_view(),
- name='account_confirm_email',
- ),
- url(
- r'^signup/done/$',
- EmailVerificationSentView.as_view(),
- name='account_email_verification_sent',
- ),
- url(
- r'^signup/$',
- SignupView.as_view(),
- name='account_signup',
- ),
- url(
- r'^reset-password/$',
- PasswordResetView.as_view(),
- name='account_reset_password',
- ),
- url(
- r'^profile/',
- include('profiles.urls', namespace='profiles')
- ),
+ # url(
+ # r'^login/$',
+ # LoginView.as_view(),
+ # name='account_login',
+ # ),
+ # url(
+ # r'^logout/$',
+ # LogoutView.as_view(),
+ # name='account_logout',
+ # ),
+ # url(
+ # r'^confirm/(?P\S+)$',
+ # ConfirmEmailView.as_view(),
+ # name='account_confirm_email',
+ # ),
+ # url(
+ # r'^signup/done/$',
+ # EmailVerificationSentView.as_view(),
+ # name='account_email_verification_sent',
+ # ),
+ # url(
+ # r'^signup/$',
+ # SignupView.as_view(),
+ # name='account_signup',
+ # ),
+ # url(
+ # r'^reset-password/$',
+ # PasswordResetView.as_view(),
+ # name='account_reset_password',
+ # ),
+ # url(
+ # r'^profile/',
+ # include('profiles.urls', namespace='profiles')
+ # ),
url(r'^admin/', include(admin.site.urls)),
]
diff --git a/requirements/base.txt b/requirements/base.txt
index 76ae6cad..0db29c86 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -1,6 +1,5 @@
-django>=1.8
+django>=1.9
django-allauth>=0.23.0
django-bootstrap3>=6.2.2
-django-flat-theme>=1.1.1
django-environ>=0.4.0
-psycopg2>=2.6.1
\ No newline at end of file
+psycopg2>=2.6.1