From ae826f38dbb58883a6afca263e4db31fee63563c Mon Sep 17 00:00:00 2001 From: ottona Date: Wed, 10 Aug 2016 00:38:10 +0200 Subject: [PATCH] initial commit of current devel snapshot --- .gitignore | 2 + blogapp/__init__.py | 0 blogapp/admin.py | 23 ++++ blogapp/apps.py | 5 + blogapp/migrations/0001_initial.py | 49 ++++++++ blogapp/migrations/__init__.py | 0 blogapp/models.py | 16 +++ blogapp/static/blogapp/images/poly.png | Bin 0 -> 4564 bytes blogapp/templates/blogapp/blogdetail.html | 59 ++++++++++ blogapp/templates/blogapp/blogindex.html | 23 ++++ blogapp/tests.py | 3 + blogapp/urls.py | 9 ++ blogapp/views.py | 73 ++++++++++++ manage.py | 10 ++ polysite/__init__.py | 0 polysite/settings.py | 133 +++++++++++++++++++++ polysite/urls.py | 22 ++++ polysite/wsgi.py | 16 +++ static/poly.png | Bin 0 -> 4564 bytes templates/base.html | 137 ++++++++++++++++++++++ templates/staticpages/viewpage.html | 21 ++++ templates/usermanager/userdetail.html | 21 ++++ templates/usermanager/useredit.html | 31 +++++ templates/usermanager/userinfoedit.html | 53 +++++++++ templates/usermanager/userlogin.html | 26 ++++ templates/usermanager/usernew.html | 28 +++++ 26 files changed, 760 insertions(+) create mode 100644 .gitignore create mode 100644 blogapp/__init__.py create mode 100644 blogapp/admin.py create mode 100644 blogapp/apps.py create mode 100644 blogapp/migrations/0001_initial.py create mode 100644 blogapp/migrations/__init__.py create mode 100644 blogapp/models.py create mode 100644 blogapp/static/blogapp/images/poly.png create mode 100644 blogapp/templates/blogapp/blogdetail.html create mode 100644 blogapp/templates/blogapp/blogindex.html create mode 100644 blogapp/tests.py create mode 100644 blogapp/urls.py create mode 100644 blogapp/views.py create mode 100755 manage.py create mode 100644 polysite/__init__.py create mode 100644 polysite/settings.py create mode 100644 polysite/urls.py create mode 100644 polysite/wsgi.py create mode 100644 static/poly.png create mode 100644 templates/base.html create mode 100644 templates/staticpages/viewpage.html create mode 100644 templates/usermanager/userdetail.html create mode 100644 templates/usermanager/useredit.html create mode 100644 templates/usermanager/userinfoedit.html create mode 100644 templates/usermanager/userlogin.html create mode 100644 templates/usermanager/usernew.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f78cf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc + diff --git a/blogapp/__init__.py b/blogapp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/blogapp/admin.py b/blogapp/admin.py new file mode 100644 index 0000000..547ccfe --- /dev/null +++ b/blogapp/admin.py @@ -0,0 +1,23 @@ +from django import forms +from django.forms import ModelForm, Textarea +from blogapp.models import blogentry, blogcomment +from django.contrib import admin + +class blogentryAdminForm(forms.ModelForm): + class Meta: + model = blogentry + fields = '__all__' + widgets = { + 'intro': forms.Textarea(attrs={'cols': 80, 'rows': 20}), + 'body': forms.Textarea(attrs={'cols': 80, 'rows': 20}), + } + +class blogentryAdmin(admin.ModelAdmin): + form = blogentryAdminForm + list_display = ('header', ) + +class blogcommentAdmin(admin.ModelAdmin): + list_display = ('date', ) + +admin.site.register(blogentry, blogentryAdmin) +admin.site.register(blogcomment, blogcommentAdmin) diff --git a/blogapp/apps.py b/blogapp/apps.py new file mode 100644 index 0000000..03a0e83 --- /dev/null +++ b/blogapp/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class BlogappConfig(AppConfig): + name = 'blogapp' diff --git a/blogapp/migrations/0001_initial.py b/blogapp/migrations/0001_initial.py new file mode 100644 index 0000000..eff7564 --- /dev/null +++ b/blogapp/migrations/0001_initial.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.1 on 2016-01-09 13:09 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='blogcomment', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('guestname', models.CharField(max_length=20)), + ('body', models.CharField(max_length=300)), + ('date', models.DateTimeField(verbose_name='date')), + ], + ), + migrations.CreateModel( + name='blogentry', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateTimeField(verbose_name='date')), + ('header', models.CharField(max_length=100)), + ('intro', models.CharField(max_length=1000)), + ('body', models.CharField(max_length=10000)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AddField( + model_name='blogcomment', + name='blogentry', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blogapp.blogentry'), + ), + migrations.AddField( + model_name='blogcomment', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/blogapp/migrations/__init__.py b/blogapp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/blogapp/models.py b/blogapp/models.py new file mode 100644 index 0000000..3bebfb7 --- /dev/null +++ b/blogapp/models.py @@ -0,0 +1,16 @@ +from django.db import models +from django.contrib.auth.models import User + +class blogentry(models.Model): + user = models.ForeignKey(User) + date = models.DateTimeField('date') + header = models.CharField(max_length=100) + intro = models.CharField(max_length=1000) + body = models.CharField(max_length=10000) + +class blogcomment(models.Model): + blogentry = models.ForeignKey(blogentry, on_delete=models.CASCADE) + user = models.ForeignKey(User) + guestname = models.CharField(max_length=20) + body = models.CharField(max_length=300) + date = models.DateTimeField('date') diff --git a/blogapp/static/blogapp/images/poly.png b/blogapp/static/blogapp/images/poly.png new file mode 100644 index 0000000000000000000000000000000000000000..fa444ba2d80616b4ac0fa73ad61dc8c31ae48517 GIT binary patch literal 4564 zcmV;_5i9PAP)o!vqQS-w|}H6sf6xMb<#l+`g2asse9{pfA@C!Tet4xSJi|xp{nWxBANqW z7Bf#`WMJUd}e!l`wup4+BE&6k3K4GY-~K_rd%)>%ojo|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#B#X@Et(a*=H zg7s>ktE?m=!I*G3A%Lz>C}vii)B8jmt98=;P*rsTGka@lYIgT;ePZDCdcTjJvE!zZ z@W$%yai?jTI&{{_a`|fAN-LCa*wag(RaI4=5z(ss`}aTK*1@qBX&?}|UkLG(uImTV z?YpU|=}pr#$Jl?((nmDFgou?n(MIWJN_q%h<7F!vN;0s`{|o*?l@hx@gfNucm1a5z+Uuv$HeeJV8n2 zhrF%J`}b%qm^lqN8xrKP8J zc6KfU07X$AsIIR5u)i{eg@r!12R2uCC72Z+~VuG5LRCW!g-t82w8C0000 + + + +

{{blogentry.header}}

+ posted by {{blogentry.user.username}} on {{blogentry.date}} + +

+ {{blogentry.intro|linebreaks}}
+ {{blogentry.body|linebreaks}}

+ {% endautoescape %} + {% if not isfrontpage %} + Comments total: {{newsentry.newscomment_set.all.count}}
+ {% for newscomment in newsentry.newscomment_set.all %} + + + + + +

{{newscomment.user.username}}
{{ newscomment.commenttext|linebreaks|urlize }}
Datum: {{newscomment.date}}
+ {% endfor %} + + + + {% if commentform %} + + + + + {% else %} + + + + + {% endif %} + +
{{user.username}}
+
+ {% csrf_token %} + {{ commentform.newscomment }}
+ +
+
+ Please log in to post. +
+ {% endif %} + + + + +{% endblock %} + + diff --git a/blogapp/templates/blogapp/blogindex.html b/blogapp/templates/blogapp/blogindex.html new file mode 100644 index 0000000..ca5b528 --- /dev/null +++ b/blogapp/templates/blogapp/blogindex.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block header %}Neuigkeiten - Übersicht {% endblock %} +{% block headline %}Neuigkeiten{% endblock %} + +{% block content %} +{% autoescape off %} +{% if blogentries %} +{% for blogentry in blogentries %} + +

+ {{ blogentry.header }}
+ posted on: {{blogentry.date}} by {{blogentry.user.username}} +

{{blogentry.intro|linebreaks}}

Read more...
+

+ +{% endfor %} +{% else %} +

No entries are available.

+{% endif %} +{% endautoescape %} +{% endblock %} + diff --git a/blogapp/tests.py b/blogapp/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/blogapp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/blogapp/urls.py b/blogapp/urls.py new file mode 100644 index 0000000..451812d --- /dev/null +++ b/blogapp/urls.py @@ -0,0 +1,9 @@ +from django.conf.urls import url + +from . import views + +urlpatterns = [ + url(r'^$', views.listall, name='listall'), + url(r'^(?P\d+)/$', views.detail, name='detail'), + #url(r'^$', views.detail, name='detail'), +] diff --git a/blogapp/views.py b/blogapp/views.py new file mode 100644 index 0000000..c1f3b76 --- /dev/null +++ b/blogapp/views.py @@ -0,0 +1,73 @@ +from blogapp.models import blogentry, blogcomment +from django.shortcuts import render_to_response, get_object_or_404 +from django.template import RequestContext +from django import forms +import datetime + +class BlogCommentForm(forms.Form): + blogcomment = forms.CharField(widget=forms.Textarea(attrs={'rows':3, 'cols':30})) + + +def listall(request): + listall_entries = blogentry.objects.all().order_by('-date')[:10] + return render_to_response('blogapp/blogindex.html', {'blogentries': listall_entries}, context_instance=RequestContext(request)) + +def detail(request, blogentry_id): + blogdetail = get_object_or_404(blogentry, pk=blogentry_id) + + form = BlogCommentForm() + if request.user.is_authenticated(): + return render_to_response('blogapp/blogdetail.html', {'blogentry': blogdetail, 'commentform': form}, context_instance=RequestContext(request)) + else: + return render_to_response('blogapp/blogdetail.html', {'blogentry': blogdetail}, context_instance=RequestContext(request)) + +#def addarticle(request): +# if not request.user.is_staff: +# return listall(request) +# +# if request.method == 'POST': +# form = NewsForm(request.POST) +# if form.is_valid(): +# blog = blogentry() +# blog.user = request.user +# blog.newsheader = form.cleaned_data['header'] +# blog.newsbody = form.cleaned_data['body'] +# blog.date = datetime.datetime.now() +# blog.save() +# +# +# #return rather to the thread detail here +# listall_entries = newsentry.objects.all().order_by('date')[:10] +# return render_to_response('blogindex.html', {'listall_entries': listall_entries}, context_instance=RequestContext(request)) +# else: +# form = NewsForm() +# return render_to_response('blogindex.html', {'showaddnewsform' : form}, context_instance=RequestContext(request)) +# +#def editnews(request, newsentry_id): +# if not request.user.is_staff: +# return listall(request) +# +# newsdetail = get_object_or_404(newsentry, pk=newsentry_id) +# +# if request.method == 'POST': +# form = NewsForm(request.POST) +# if form.is_valid(): +# newsdetail.newsheader = form.cleaned_data['newsheader'] +# newsdetail.newsbody = form.cleaned_data['newsbody'] +# newsdetail.save() +# return detail(request, newsentry_id) +# +# +# data = {'newsheader': newsdetail.newsheader, 'newsbody': newsdetail.newsbody} +# form = NewsForm(data) +# return render_to_response('newsedit.html', {'editform' : form}, context_instance=RequestContext(request)) +# +#d#ef showfrontpage(request): +#0 newsdetail = get_object_or_404(newsentry, pk=1) +# return render_to_response('newsapp/newsdetail.html', {'newsentry': newsdetail, 'isfrontpage': True}, context_instance=RequestContext(request)) +# +# +#d#ef getincludes(request): +# eventlist = evententry.objects.all().order_by('-date')[:10] +# appointmentlist = event.objects.all().filter(eventend__gte = datetime.datetime.now()).order_by('eventstart')[:5] +# return {'eventlist' : eventlist, 'appointmentlist' : appointmentlist} diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..1e683c2 --- /dev/null +++ b/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "polysite.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/polysite/__init__.py b/polysite/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/polysite/settings.py b/polysite/settings.py new file mode 100644 index 0000000..05e7afb --- /dev/null +++ b/polysite/settings.py @@ -0,0 +1,133 @@ +""" +Django settings for polysite project. + +Generated by 'django-admin startproject' using Django 1.9.1. + +For more information on this file, see +https://docs.djangoproject.com/en/1.9/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.9/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'c=62ybp2ppak&@1r+x(cc)u+iw9%ljsq8-w10h9a14##)51yh3' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'blogapp.apps.BlogappConfig', + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE_CLASSES = [ + 'django.middleware.security.SecurityMiddleware', + '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 = 'polysite.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + '/home/ottona/Projekte/polysite/templates', + '/home/ottona/Projekte/polysite/blogapp/templates/blogapp', + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'polysite.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.9/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'djangotest', + 'USER': 'pguser', + 'PASSWORD': '', + 'HOST': '127.0.0.1', + 'PORT': '5432', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.9/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.9/howto/static-files/ + +STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), + '/home/ottona/Projekte/polysite/static', +] diff --git a/polysite/urls.py b/polysite/urls.py new file mode 100644 index 0000000..fdbb9c8 --- /dev/null +++ b/polysite/urls.py @@ -0,0 +1,22 @@ +"""polysite URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.9/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url, include +from django.contrib import admin + +urlpatterns = [ + url(r'^blog/', include('blogapp.urls')), + url(r'^admin/', admin.site.urls), +] diff --git a/polysite/wsgi.py b/polysite/wsgi.py new file mode 100644 index 0000000..ecdd5a0 --- /dev/null +++ b/polysite/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for polysite 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.9/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "polysite.settings") + +application = get_wsgi_application() diff --git a/static/poly.png b/static/poly.png new file mode 100644 index 0000000000000000000000000000000000000000..fa444ba2d80616b4ac0fa73ad61dc8c31ae48517 GIT binary patch literal 4564 zcmV;_5i9PAP)o!vqQS-w|}H6sf6xMb<#l+`g2asse9{pfA@C!Tet4xSJi|xp{nWxBANqW z7Bf#`WMJUd}e!l`wup4+BE&6k3K4GY-~K_rd%)>%ojo|1F%L)xz24HGmJbu z{TYPA;jAfBrmSSiIcwG|Jr;}Y-L-4im43hfLLyp!=+L2P ze`R;>+_`_;xN*Pt`Fz*q<>iGZPoDhJu3fw0j%hQDY?2Bz91aKC+uNT7@O&f^S=rdw z=xUs4i_`D-k3DeUz_#t%x6jDR$~t@W=+WOIBHfKh8yg$V9XodXDK9V2BZPSH+;h*3 zeDJ{sM_hic3?l@Q=tMXi4s>*MJkQL_rIgif9XiF?_nhDFpF45l#1|$_nsl;Te^Scz zMD!ptKVMi_nCrG&hLJ&Bfri83tY|d)jA0n}*VNR!>eg8@aoP+-q`I!ZE`+#SQIy{m z6cl8;Etg^V6IYm z&647fo0~gl{P^*eZbT}j+)G3qB_$=3-TKck{7?YEFpM7pSks^JQ1qOAu|)c8Q&ZD5 zUw-*zQ!-m-UK5MO<^%YzbkrRVhXZYGZFvAdM4v_?k$rZ4G#V`+qDiJ{enmvvQ;E3J zG;N$|nil~$-OBpJFpSp*Gh?1NZ=T=l^`2{|M~@!;Zbd~!!kxBYF!+xEMgxG?>;0m- zy1LPAU8<_iFin#HAQp@5*|1^5m+|aEq0m%j&IJHw{@jlBEh;LSPDCCnzqz)yc1NPR zG)>Dh3?l#l9*?I*ScNXh&(E(<*2rTaPMh4^+$+vI@4P>Z88as7&QT;1*-S*2q^sVJ zj*jz%5L<*0TL9bx0II6~M>HDU2S76O<3zL;Ktm`LdcD6fa4;CmS5@^-%)F0?Du`&M z^;fAV%BQNTRuvT$oimWO`g}eXLcCYKsgKZm&#lDwfb$_wTW@Tml zYa$~d#N)P|$K&Z<2~rfL#F77QqW@cQaq+(}^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z7VgVl=3zr`Y8Z=smX8on2nxs=V1Up zky73n&j%4L0`Nhf>>TurEsw%9P3O)Mm^tazW=BWIo#;Jo2D-xXM%xKp*FOPp6@cy` z88eRuaH$oaU;?p2_l+2RIhD}#bRH?VzG+={2LKfp(`S1JrON24C7oWDP>!{wn!--LzhU)0X)pi|3m^CCpct!w#5aJmt1S}~7=}CnUv7r#B#X@Et(a*=H zg7s>ktE?m=!I*G3A%Lz>C}vii)B8jmt98=;P*rsTGka@lYIgT;ePZDCdcTjJvE!zZ z@W$%yai?jTI&{{_a`|fAN-LCa*wag(RaI4=5z(ss`}aTK*1@qBX&?}|UkLG(uImTV z?YpU|=}pr#$Jl?((nmDFgou?n(MIWJN_q%h<7F!vN;0s`{|o*?l@hx@gfNucm1a5z+Uuv$HeeJV8n2 zhrF%J`}b%qm^lqN8xrKP8J zc6KfU07X$AsIIR5u)i{eg@r!12R2uCC72Z+~VuG5LRCW!g-t82w8C0000 + + + {% load staticfiles %} + + {% block head %}{% endblock %} + + polylux + + + +
+ +
+
+
  • Home
  • Blog
+
+ + + + + + + + + + +
+ + + + + +{% for page in pages %} + +{% endfor %} + + + +
Home
+
Blog
+
Static Page
+
Forum
+
+
+ + + + + + +
+
+ + + + + + + + + + + +
{% block headline %} {% endblock %}
+
+ User stuff + +
+ {% if errormsg %} + + + + + + +
Error:
+
    +
  • {{ errormsg }}
    +
  • +
+
+ {% endif %} +{% block content %} {% endblock %}
+

+ {% block sidebar %} + {% if eventlist %} + Aktivitäten: + + {% for evententry in eventlist %} + + {% endfor %} +
+ {% ifchanged evententry.date.date %}
{{evententry.date|date:"d. M."}}:
{% endifchanged %}{{evententry.user.username}} {{ evententry.eventmessage }}
+
+

+ {% endif %} + + + {% if appointmentlist %} + Termine: + + {% for obj in appointmentlist %} + + {% endfor %} +
+ {{obj.eventname}}
+ {% ifequal obj.eventstart.date obj.eventend.date%} + {{obj.eventstart|date:"d. M. H"}}Uhr + {% else %} + {{obj.eventstart|date:"d. M."}}-{{obj.eventend|date:"d. M."}} + {% endifequal %} + ({{ obj.getUsersAttending.count }} Gäste) +
+
+ {% endif %} + {% endblock %} +
+ + ofl Webpage
+ (c) polylux
+ Site realized utilizing Django, a great and powerful python-based web development framework.
+ Thanks to davidst for hosting this site. +
+
+
+
+ +
+ +
+ + + diff --git a/templates/staticpages/viewpage.html b/templates/staticpages/viewpage.html new file mode 100644 index 0000000..0bd5ed5 --- /dev/null +++ b/templates/staticpages/viewpage.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block content %} +{% autoescape off %} + + + + + + +
+

{{ pagecontent.caption }}

+ last edited by {{ pagecontent.user.username }} on {{ pagecontent.date }} + +

+ {{pagecontent.content|linebreaks}}

+
+{% endautoescape %} +{% endblock %} + + diff --git a/templates/usermanager/userdetail.html b/templates/usermanager/userdetail.html new file mode 100644 index 0000000..f30d0b0 --- /dev/null +++ b/templates/usermanager/userdetail.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + +
Test + {% if displayuser %} + Name: {{displayuser.username}}
+ Wohnt in: {{displayuser.get_profile.userlocation}}
+ AS-Ausrüstung: {{displayuser.get_profile.userequipment}}
+ Forumbeiträge gesamt: {{displayuser.get_profile.forumtotal}}
+ Kommentare gesamt: {{displayuser.get_profile.commenttotal}}
+ {% endif %} + Hier entsteht in Kürze die Infoseite für Benutzerkonten. ;) +
+{% endblock %} + diff --git a/templates/usermanager/useredit.html b/templates/usermanager/useredit.html new file mode 100644 index 0000000..06ef2cf --- /dev/null +++ b/templates/usermanager/useredit.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + +
+

Benutzerdetails editieren:

+
+ {% csrf_token %} + Benutzername:
+ {{ user.username }} (not editable)

+ First Name:
+ {{ editform.firstname }} (optional)

+ Last Name:
+ {{ editform.lastname }} (optional)

+ EMail-Address:
+ {{ editform.email }} (optional)

+ Password:
+ {{ editform.password }}
+ Hint: Leave this field empty if you don't want to change your password.
+ +
+ + +
+{% endblock %} + diff --git a/templates/usermanager/userinfoedit.html b/templates/usermanager/userinfoedit.html new file mode 100644 index 0000000..5e8ccf9 --- /dev/null +++ b/templates/usermanager/userinfoedit.html @@ -0,0 +1,53 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + +
+ {% if editform %} +

Benutzerinfo editieren:

+ Note: All fields are optional.

+
+ Bild:
+
+ Upload new image...

+ Description:
+ Some info / bio about you.
+ {{ editform.userdescription }}

+ Location:
+ {{ editform.userlocation }}

+ Forum Short Description:
+ Small desc / title for the forum. 50 chars max.
+ {{ editform.userforuminfo }}

+ Skype:
+ Your Skype username
+ {{ editform.userskype }}

+ ICQ:
+ Your ICQ user id
+ {{ editform.usericq }}

+ Jabber / XMPP:
+ Your XMPP identifier:
+ {{ editform.userjabber }}

+ + +
+ {% endif %} + {% if imageform %} +

Current Image:

+

+

Change Image:

+ Note: The image is scaled to 64 x 64 pixels.
+ Hence use a mostly quadratic image.

+
+ Image:
+ {{ imageform.userimage }}
+ +
+ {% endif %} +
+{% endblock %} + diff --git a/templates/usermanager/userlogin.html b/templates/usermanager/userlogin.html new file mode 100644 index 0000000..d227ddf --- /dev/null +++ b/templates/usermanager/userlogin.html @@ -0,0 +1,26 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + + +
+

Login:

+ (Create a new user instead?)

+
+ {% csrf_token %} + Username:
+ {{ editform.username }} (required)

+ Password:
+ {{ editform.password }} (required)

+ +
+ + +
+{% endblock %} + diff --git a/templates/usermanager/usernew.html b/templates/usermanager/usernew.html new file mode 100644 index 0000000..d8c8df8 --- /dev/null +++ b/templates/usermanager/usernew.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + +
+

Create a new user:

+
+ {% csrf_token %} + Username:
+ Your login, not changeable. Stay alphanumeric.
+ {{ editform.username }} (required)

+ Email Address:
+ {{ editform.email }} (optional)

+ Low Security Captcha:
+ Enter the word 'linux' inverted (back front)
+ {{ editform.botquestion }} (required)

+ Password:
+ {{ editform.password }} (required)

+ +
+
+{% endblock %} +