implement adding websites

- implement websites.models.Website
- add migration
- implement websites.views.AddWebsite
- implement websites.forms.AddWebsiteForm
- define URL pattern 'add_website' in websites.urls
- register Website model in websites.admin
- add templates websites/base.html and websites/website_create.html
- add german translation for new strings
- add website URLs to gnuviechadmin.urls
- add websites to INSTALLED_APPS
- add changelog entry
This commit is contained in:
Jan Dittberner 2015-01-26 22:47:49 +01:00
parent cff35dd408
commit 711a96212c
12 changed files with 297 additions and 5 deletions

View file

@ -0,0 +1,30 @@
{% extends "websites/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% spaceless %}
{% if user == customer %}
{% blocktrans with domain=domain.domain %}Add Website for Subdomain of {{ domain }}{% endblocktrans %}
{% else %}
{% blocktrans with domain=domain.domain full_name=customer.get_full_name %}Add Website for Subdomain of Domain {{ domain }} of Customer {{ full_name }}{% endblocktrans %}
{% endif %}
{% endspaceless %}{% endblock title %}
{% block page_title %}{% spaceless %}
{% if user == customer %}
{% blocktrans with domain=domain.domain %}Add Website <small>for Subdomain of {{ domain }}</small>{% endblocktrans %}
{% else %}
{% blocktrans with domain=domain.domain full_name=customer.get_full_name %}Add Website <small>for Subdomain of Domain {{ domain }} of Customer {{ full_name }}</small>{% endblocktrans %}
{% endif %}
{% endspaceless %}{% endblock page_title %}
{% block content %}
{% crispy form %}
{% endblock %}
{% block extra_js %}
<script type="text/javascript">
$(document).ready(function() {
$('input[type=text]').first().focus();
});
</script>
{% endblock extra_js %}