Browse Source

initial commit of current devel snapshot

master
ottona 5 years ago
commit
ae826f38db
  1. 2
      .gitignore
  2. 0
      blogapp/__init__.py
  3. 23
      blogapp/admin.py
  4. 5
      blogapp/apps.py
  5. 49
      blogapp/migrations/0001_initial.py
  6. 0
      blogapp/migrations/__init__.py
  7. 16
      blogapp/models.py
  8. BIN
      blogapp/static/blogapp/images/poly.png
  9. 59
      blogapp/templates/blogapp/blogdetail.html
  10. 23
      blogapp/templates/blogapp/blogindex.html
  11. 3
      blogapp/tests.py
  12. 9
      blogapp/urls.py
  13. 73
      blogapp/views.py
  14. 10
      manage.py
  15. 0
      polysite/__init__.py
  16. 133
      polysite/settings.py
  17. 22
      polysite/urls.py
  18. 16
      polysite/wsgi.py
  19. BIN
      static/poly.png
  20. 137
      templates/base.html
  21. 21
      templates/staticpages/viewpage.html
  22. 21
      templates/usermanager/userdetail.html
  23. 31
      templates/usermanager/useredit.html
  24. 53
      templates/usermanager/userinfoedit.html
  25. 26
      templates/usermanager/userlogin.html
  26. 28
      templates/usermanager/usernew.html

2
.gitignore

@ -0,0 +1,2 @@
*.pyc

0
blogapp/__init__.py

23
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)

5
blogapp/apps.py

@ -0,0 +1,5 @@
from django.apps import AppConfig
class BlogappConfig(AppConfig):
name = 'blogapp'

49
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),
),
]

0
blogapp/migrations/__init__.py

16
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')

BIN
blogapp/static/blogapp/images/poly.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

59
blogapp/templates/blogapp/blogdetail.html

@ -0,0 +1,59 @@
{% extends "base.html" %}
{% block content %}
{% autoescape off %}
<table style="align: center; width: 90%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>
<h1>{{blogentry.header}}</h1>
<small>posted by {{blogentry.user.username}} on {{blogentry.date}}
</small>
<br><br>
{{blogentry.intro|linebreaks}}<br>
{{blogentry.body|linebreaks}}<br><br>
{% endautoescape %}
{% if not isfrontpage %}
<b>Comments total: {{newsentry.newscomment_set.all.count}}</b><br/>
{% for newscomment in newsentry.newscomment_set.all %}
<table class="forumentry">
<tr>
<td align="center" style="border-top:1px; width: 80px; solid #b2c9d5;"><img src="/polylux/{{ newscomment.user.get_profile.getImage }}"></img></td>
<td style="border-top:1px solid #b2c9d5;"><br/><a href="/blackmesa/usermanager/detail/{{newscomment.user.id}}/">{{newscomment.user.username}}</a><br>{{ newscomment.commenttext|linebreaks|urlize }}<br/><small>Datum: {{newscomment.date}}</small></td>
</tr>
</table>
{% endfor %}
<table
style="text-align: left; width: 75%; margin-left: auto; margin-right: auto;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
{% if commentform %}
<tr>
<td align="center">{{user.username}}<br><img src="/polylux/{{ user.get_profile.getImage }}"></img></td>
<td>
<form action="" method="post">
{% csrf_token %}
{{ commentform.newscomment }}<br>
<input type="submit" value="Submit" />
</form>
</td>
</tr>
{% else %}
<tr>
<td align="center"></td>
<td>
<strong>Please log in to post.</strong>
</td>
</tr>
{% endif %}
</tbody>
</table>
{% endif %}
</tr>
</td>
</tbody>
</table>
{% endblock %}

23
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 %}
<table style="width: 80%"><tr><td ><br/>
<big><big><big><a href="{% url 'detail' blogentry.id %}">{{ blogentry.header }}</a></big></big></big><br/>
<span style="color: #b0b0b0;"><small>posted on: {{blogentry.date}} by {{blogentry.user.username}}</small></span>
<p>{{blogentry.intro|linebreaks}}</p><a href="{% url 'detail' blogentry.id %}">Read more...</a><br/>
<br/><br/></td></tr></table>
{% endfor %}
{% else %}
<p>No entries are available.</p>
{% endif %}
{% endautoescape %}
{% endblock %}

3
blogapp/tests.py

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

9
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<blogentry_id>\d+)/$', views.detail, name='detail'),
#url(r'^$', views.detail, name='detail'),
]

73
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}

10
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)

0
polysite/__init__.py

133
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',
]

22
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),
]

16
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()

BIN
static/poly.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

137
templates/base.html

@ -0,0 +1,137 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static "base-dark.css" %}" />
{% block head %}{% endblock %}
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
<title>polylux</title>
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" alink="#000099" link="#000099" vlink="#990099">
<div style="margin: 0 auto; max-width: 1000px !important; padding-right: 20px !important; padding-left: 20px !important;padding-right: 20px !important;">
<img src="{% static "poly.png" %}"/>
</div>
<div style="margin: 0 auto; max-width: 1000px !important; padding-right: 20px !important; padding-left: 20px !important;padding-right: 20px !important;">
<ul style="list-style: none"><li style="display: table-cell;">Home</li><li>Blog</li></ul>
</div>
<table style="text-align: left; width: 1000px; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: top;">
<table style="text-align: left; table-layout: fixed; background-color: rgb(128, 128, 128); width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top; text-align: center;">Home<br>
</td>
<td style="vertical-align: top; text-align: center;"><a href="{% url 'listall' %}">Blog</a><br>
</td>
{% for page in pages %}
<td style="vertical-align: top; text-align: center;">Static Page<br>
</td>
{% endfor %}
<td style="vertical-align: top; text-align: center;">Forum<br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="vertical-align: top;">
<table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: middle; background-color: rgb(157, 158, 88);">{% block headline %} {% endblock %}<br>
</td>
<td style="vertical-align: middle; text-align: right; background-color: rgb(157, 158, 88); width: 25%;"><small>
User stuff
</small>
</td>
</tr>
<div id="main">
<tr style="min-height: 1000px;">
<td style="vertical-align: top; background-color: rgb(75, 74, 70); color: rgb(222, 222, 212);">
{% if errormsg %}
<table
style="text-align: left; width: 75%; margin-left: auto; margin-right: auto;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td
style="vertical-align: top; background-color: rgb(181, 0, 0);">Error:<br>
<ul>
<li>{{ errormsg }}<br>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
{% endif %}
{% block content %} {% endblock %}<br>
</td>
<td style="vertical-align: top; background-color: rgb(60, 60, 60); color: rgb(222, 222, 212);"><br>
{% block sidebar %}
{% if eventlist %}
<b>Aktivitäten:</b>
<table>
{% for evententry in eventlist %}
<tr><td style="">
<small>{% ifchanged evententry.date.date %}<br/>{{evententry.date|date:"d. M."}}:<br/>{% endifchanged %}<b>{{evententry.user.username}}</b> <a href="{{ evententry.eventlink }}">{{ evententry.eventmessage }}</a></small>
</td></tr>
{% endfor %}
</table>
<br/><br/>
{% endif %}
{% if appointmentlist %}
<b>Termine:</b>
<table>
{% for obj in appointmentlist %}
<tr><td style="">
<small><b><a href="/blackmesa/events/{{obj.id}}/">{{obj.eventname}}</a></b><br/>
{% 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)
</small>
</td></tr>
{% endfor %}
</table>
{% endif %}
{% endblock %}
</td>
</tr>
</div>
<tr>
<td style="vertical-align: top; background-color: rgb(128, 128, 128); color: rgb(222, 222, 212);">
<small>
ofl Webpage<br/>
(c) <a href="mailto:polylux@mad.scientist.com">polylux</a><br/>
Site realized utilizing <a href="http://www.djangoproject.com">Django</a>, a great and powerful python-based web development framework.<br/>
Thanks to davidst for hosting this site.
</small>
</td>
<td style="vertical-align: top; background-color: rgb(128, 128, 128); color: rgb(222, 222, 212);">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<br>
</body></html>

21
templates/staticpages/viewpage.html

@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block content %}
{% autoescape off %}
<table style="align: center; width: 90%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>
<h1>{{ pagecontent.caption }}</h1>
<small>last edited by {{ pagecontent.user.username }} on {{ pagecontent.date }}
</small>
<br><br>
{{pagecontent.content|linebreaks}}<br><br>
</td>
</tr>
</tbody>
</table>
{% endautoescape %}
{% endblock %}

21
templates/usermanager/userdetail.html

@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block content %}
<table style="align: center; width: 50%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>Test
{% if displayuser %}
Name: {{displayuser.username}}<br/>
Wohnt in: {{displayuser.get_profile.userlocation}}<br/>
AS-Ausrüstung: {{displayuser.get_profile.userequipment}}<br/>
Forumbeiträge gesamt: {{displayuser.get_profile.forumtotal}}<br/>
Kommentare gesamt: {{displayuser.get_profile.commenttotal}}<br/>
{% endif %}
<b>Hier entsteht in Kürze die Infoseite für Benutzerkonten. ;)</b>
</td>
</tr>
</tbody>
</table>
{% endblock %}

31
templates/usermanager/useredit.html

@ -0,0 +1,31 @@
{% extends "base.html" %}
{% block content %}
<table style="align: center; width: 50%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>
<h3>Benutzerdetails editieren:</h3>
<form action="" method="post">
{% csrf_token %}
<b>Benutzername:</b><br/>
{{ user.username }} <i>(not editable)</i><br/><br/>
<b>First Name:</b><br/>
{{ editform.firstname }} <i>(optional)</i><br/><br/>
<b>Last Name:</b><br/>
{{ editform.lastname }} <i>(optional)</i><br/><br/>
<b>EMail-Address:</b><br/>
{{ editform.email }} <i>(optional)</i><br/><br/>
<b>Password:</b><br/>
{{ editform.password }}<br/>
<small>Hint: Leave this field empty if you don't want to change your password.</small><br/>
<input type="submit" value="Submit" />
</form>
</td>
</tr>
</tbody>
</table>
{% endblock %}

53
templates/usermanager/userinfoedit.html

@ -0,0 +1,53 @@
{% extends "base.html" %}
{% block content %}
<table style="align: center; width: 50%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>
{% if editform %}
<h1>Benutzerinfo editieren:</h1>
<i>Note: All fields are optional.</i><br/><br/>
<form action="" method="post">
<b>Bild:</b><br/>
<img src="{{ user.get_profile.getImage }}"/><br/>
<a href="/blackmesa/usermanager/imageupload/">Upload new image...</a><br/><br/>
<b>Description:</b><br/>
<i>Some info / bio about you.</i><br/>
{{ editform.userdescription }}<br/><br/>
<b>Location:</b><br/>
{{ editform.userlocation }}<br/><br/>
<b>Forum Short Description:</b><br/>
<i>Small desc / title for the forum. 50 chars max.</i><br/>
{{ editform.userforuminfo }}<br/><br/>
<b>Skype:</b><br/>
<i>Your Skype username</i><br/>
{{ editform.userskype }}<br/><br/>
<b>ICQ:</b><br/>
<i>Your ICQ user id</i><br/>
{{ editform.usericq }}<br/><br/>
<b>Jabber / XMPP:</b><br/>
<i>Your XMPP identifier:</i><br/>
{{ editform.userjabber }}<br/><br/>
<input type="submit" value="Submit" />
</form>
{% endif %}
{% if imageform %}
<h3>Current Image:</h3>
<img src="{{ userinfo.userimage.url }}"/><br/><br/>
<h3>Change Image:</h3>
<i><b>Note:</b> The image is scaled to 64 x 64 pixels.<br/>
Hence use a mostly quadratic image.</i><br/>
<form enctype="multipart/form-data" action="" method="post">
<b>Image:</b><br/>
{{ imageform.userimage }}<br/>
<input type="submit" value="Submit" />
</form>
{% endif %}
</td>
</tr>
</tbody>
</table>
{% endblock %}

26
templates/usermanager/userlogin.html

@ -0,0 +1,26 @@
{% extends "base.html" %}
{% block content %}
<!--<table style="align: center; width: 50%; margin-left: auto; margin-right: auto">-->
<table class="notification">
<tbody>
<tr>
<td>
<h3>Login:</h3>
(Create <a href="{% url 'usernew' %}">a new user</a> instead?)<br/><br/>
<form action="" method="post">
{% csrf_token %}
<b>Username:</b><br/>
{{ editform.username }} <i>(required)</i><br/><br/>
<b>Password:</b><br/>
{{ editform.password }} <i>(required)</i><br/><br/>
<input type="submit" value="Submit" />
</form>
</td>
</tr>
</tbody>
</table>
{% endblock %}

28
templates/usermanager/usernew.html

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block content %}
<table style="align: center; width: 50%; margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td>
<h1>Create a new user:</h1>
<form action="" method="post">
{% csrf_token %}
<b>Username:</b><br/>
<small>Your login, not changeable. Stay alphanumeric.</small><br/>
{{ editform.username }} <i>(required)</i><br/><br/>
<b>Email Address:</b><br/>
{{ editform.email }} <i>(optional)</i><br/><br/>
<b>Low Security Captcha:</b><br/>
<small>Enter the word 'linux' inverted (back front)</small><br/>
{{ editform.botquestion }} <i>(required)</i><br/><br/>
<b>Password:</b><br/>
{{ editform.password }} <i>(required)</i><br/><br/>
<input type="submit" value="Submit" />
</form>
</td>
</tr>
</tbody>
</table>
{% endblock %}
Loading…
Cancel
Save