add first view to digital.glarus
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
parent
6bb80d117c
commit
5d1b26d4f7
4 changed files with 36 additions and 1 deletions
24
digital_glarus/migrations/0001_initial.py
Normal file
24
digital_glarus/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Message',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('phone_number', models.CharField(max_length=200)),
|
||||
('message', models.TextField()),
|
||||
('received_date', models.DateTimeField(verbose_name='date received')),
|
||||
],
|
||||
),
|
||||
]
|
7
digital_glarus/urls.py
Normal file
7
digital_glarus/urls.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.index, name='index'),
|
||||
]
|
|
@ -1,3 +1,6 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from django.http import HttpResponse
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("Hello, world. You're at the polls index.")
|
||||
|
|
|
@ -7,4 +7,5 @@ urlpatterns = [
|
|||
# url(r'^blog/', include('blog.urls')),
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^digital.glarus/', include('digital_glarus.urls')),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue