From 53bb7c4d75b9fe1f6b7f4c03d92bc1f1e2ce615f Mon Sep 17 00:00:00 2001 From: iou1name Date: Fri, 10 Aug 2018 19:14:33 -0400 Subject: [PATCH] added signup page --- signup/__init__.py | 0 signup/admin.py | 3 +++ signup/apps.py | 5 +++++ signup/jinja2/signup/index.html | 24 ++++++++++++++++++++++++ signup/migrations/__init__.py | 0 signup/models.py | 3 +++ signup/tests.py | 3 +++ signup/urls.py | 12 ++++++++++++ signup/views.py | 13 +++++++++++++ 9 files changed, 63 insertions(+) create mode 100644 signup/__init__.py create mode 100644 signup/admin.py create mode 100644 signup/apps.py create mode 100644 signup/jinja2/signup/index.html create mode 100644 signup/migrations/__init__.py create mode 100644 signup/models.py create mode 100644 signup/tests.py create mode 100644 signup/urls.py create mode 100644 signup/views.py diff --git a/signup/__init__.py b/signup/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/signup/admin.py b/signup/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/signup/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/signup/apps.py b/signup/apps.py new file mode 100644 index 0000000..e448be9 --- /dev/null +++ b/signup/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class SignupConfig(AppConfig): + name = 'signup' diff --git a/signup/jinja2/signup/index.html b/signup/jinja2/signup/index.html new file mode 100644 index 0000000..5bb27a8 --- /dev/null +++ b/signup/jinja2/signup/index.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} +{% block title %}Sign up a new account{% endblock %} +{% block content %} +

Sign up

+
+

Username rules: +

+

Password rules: +

+
+
+ {{ csrf_input }} +
+
+
+
+ +
+{% endblock %} diff --git a/signup/migrations/__init__.py b/signup/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/signup/models.py b/signup/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/signup/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/signup/tests.py b/signup/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/signup/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/signup/urls.py b/signup/urls.py new file mode 100644 index 0000000..0ed313b --- /dev/null +++ b/signup/urls.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +""" +signup app URL configuration. +""" +from django.urls import path + +from . import views + +app_name = 'signup' +urlpatterns = [ + path('', views.index, name='index'), +] diff --git a/signup/views.py b/signup/views.py new file mode 100644 index 0000000..702e800 --- /dev/null +++ b/signup/views.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +""" +/signup app views. +""" +from django.shortcuts import render + +def index(request): + """ + The signup page. + """ + if request.method == "GET": + context = {} + return render(request, 'signup/index.html', context)