diff --git a/demo/db.sqlite3 b/demo/db.sqlite3 new file mode 100644 index 0000000..4881c8f Binary files /dev/null and b/demo/db.sqlite3 differ diff --git a/demo/demo/__init__.py b/demo/demo/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/demo/demo/settings.py b/demo/demo/settings.py new file mode 100644 index 0000000..10fc69f --- /dev/null +++ b/demo/demo/settings.py @@ -0,0 +1,100 @@ +""" +Django settings for demo project. + +For more information on this file, see +https://docs.djangoproject.com/en/1.7/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.7/ref/settings/ +""" + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +import os +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'ma3c@7uu!%e0=tynp+i6+q%$)9v@$t(eulqurym_b=48z82&5n' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +TEMPLATE_DEBUG = True + +ALLOWED_HOSTS = [] + +TEMPLATE_CONTEXT_PROCESSORS = ( + 'django.contrib.auth.context_processors.auth', + "django.core.context_processors.request", + "allauth.account.context_processors.account", + "allauth.socialaccount.context_processors.socialaccount", +) + +# Application definition + +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + # 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django.contrib.sites', + + 'rest_framework', + 'rest_framework.authtoken', + 'rest_auth', + + 'allauth', + 'allauth.account', + 'rest_auth.registration', +) + +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +) + +ROOT_URLCONF = 'demo.urls' + +WSGI_APPLICATION = 'demo.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.7/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + +# Internationalization +# https://docs.djangoproject.com/en/1.7/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.7/howto/static-files/ + +STATIC_URL = '/static/' + +TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] diff --git a/demo/demo/urls.py b/demo/demo/urls.py new file mode 100644 index 0000000..7cdb267 --- /dev/null +++ b/demo/demo/urls.py @@ -0,0 +1,12 @@ +from django.conf.urls import patterns, include, url +from django.contrib import admin +from django.views.generic import TemplateView + +urlpatterns = patterns('', + # Examples: + url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), + # url(r'^blog/', include('blog.urls')), + url(r'^rest-auth/', include('rest_auth.urls')), + url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), + url(r'^admin/', include(admin.site.urls)), +) diff --git a/demo/demo/wsgi.py b/demo/demo/wsgi.py new file mode 100644 index 0000000..ef48754 --- /dev/null +++ b/demo/demo/wsgi.py @@ -0,0 +1,14 @@ +""" +WSGI config for demo 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.7/howto/deployment/wsgi/ +""" + +import os +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() diff --git a/demo/manage.py b/demo/manage.py new file mode 100644 index 0000000..86cc0b0 --- /dev/null +++ b/demo/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/demo/templates/home.html b/demo/templates/home.html new file mode 100644 index 0000000..a4107e0 --- /dev/null +++ b/demo/templates/home.html @@ -0,0 +1,120 @@ + + +
+ + + + + + +