diff --git a/.gitignore b/.gitignore index dae79de..604e3df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.settings .project .pydevproject *.pyc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..12a7221 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "public/static/contrib/bootstrap"] + path = public/static/contrib/bootstrap + url = https://github.com/twbs/bootstrap.git diff --git a/citavi_mapper/__init__.py b/citavi_mapper/__init__.py index e69de29..40a96af 100644 --- a/citavi_mapper/__init__.py +++ b/citavi_mapper/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/citavi_mapper/settings.py b/citavi_mapper/settings.py index 0be59a4..838df29 100644 --- a/citavi_mapper/settings.py +++ b/citavi_mapper/settings.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + """ Django settings for citavi_mapper project. @@ -36,6 +38,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'crispy_forms', 'hello', ) @@ -53,6 +56,8 @@ ROOT_URLCONF = 'citavi_mapper.urls' WSGI_APPLICATION = 'citavi_mapper.wsgi.application' +CRISPY_TEMPLATE_PACK = 'bootstrap3' + # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases diff --git a/citavi_mapper/urls.py b/citavi_mapper/urls.py index 14cc102..200f950 100644 --- a/citavi_mapper/urls.py +++ b/citavi_mapper/urls.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from django.conf.urls import patterns, include, url from django.contrib import admin diff --git a/citavi_mapper/wsgi.py b/citavi_mapper/wsgi.py index 33df60a..e024d29 100644 --- a/citavi_mapper/wsgi.py +++ b/citavi_mapper/wsgi.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + """ WSGI config for citavi_mapper project. diff --git a/hello/__init__.py b/hello/__init__.py index e69de29..633f866 100644 --- a/hello/__init__.py +++ b/hello/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- + diff --git a/hello/admin.py b/hello/admin.py index 8c38f3f..ab35bfd 100644 --- a/hello/admin.py +++ b/hello/admin.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from django.contrib import admin # Register your models here. diff --git a/hello/models.py b/hello/models.py index 71a8362..4ec29ca 100644 --- a/hello/models.py +++ b/hello/models.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from django.db import models # Create your models here. diff --git a/hello/templates/hello.html b/hello/templates/hello.html new file mode 100644 index 0000000..e69de29 diff --git a/hello/tests.py b/hello/tests.py index 7ce503c..eae5a39 100644 --- a/hello/tests.py +++ b/hello/tests.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from django.test import TestCase # Create your tests here. diff --git a/hello/urls.py b/hello/urls.py index 3a5c122..d07a34b 100644 --- a/hello/urls.py +++ b/hello/urls.py @@ -1,7 +1,10 @@ +# -*- coding: utf-8 -*- + from django.conf.urls import patterns, url from hello import views urlpatterns = patterns('', - url(r'^$', views.index, name='index') + url(r'^$', views.Hello.as_view(), name='hello'), + url(r'^formtest/$', views.FormTest.as_view(), name='formtest') ) \ No newline at end of file diff --git a/hello/views.py b/hello/views.py index 4bc16ca..08959a4 100644 --- a/hello/views.py +++ b/hello/views.py @@ -1,5 +1,11 @@ -from django.http import HttpResponse +# -*- coding: utf-8 -*- -# Create your views here. -def index(request): - return HttpResponse('Hello World!') \ No newline at end of file +from django.http import HttpResponse +from django.views.generic import TemplateView +from django.views.generic import FormView + +class Hello(TemplateView): + template_name = "hello.html" + +class FormTest(FormView): + pass \ No newline at end of file diff --git a/public/static/contrib/bootstrap b/public/static/contrib/bootstrap new file mode 160000 index 0000000..2c46418 --- /dev/null +++ b/public/static/contrib/bootstrap @@ -0,0 +1 @@ +Subproject commit 2c4641855dd0505608566489392ed35aaa6cf2e3 diff --git a/public/templates/main.html b/public/templates/main.html new file mode 100644 index 0000000..0dffa8a --- /dev/null +++ b/public/templates/main.html @@ -0,0 +1,11 @@ + + + + + {% block title %}Citavi Mapper{% endblock %} + + +

{% block headline %}{% endblock %}

+ {% block content %}{% endblock %} + + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 0808812..f49e1bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -django psycopg2 +django +django-crispy-forms