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:
parent
cff35dd408
commit
711a96212c
12 changed files with 297 additions and 5 deletions
34
gnuviechadmin/websites/migrations/0001_initial.py
Normal file
34
gnuviechadmin/websites/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('osusers', '0004_auto_20150104_1751'),
|
||||
('domains', '0002_auto_20150124_1909'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Website',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('subdomain', models.CharField(max_length=64, verbose_name='sub domain')),
|
||||
('wildcard', models.BooleanField(default=False, verbose_name='wildcard')),
|
||||
('domain', models.ForeignKey(verbose_name='domain', to='domains.HostingDomain')),
|
||||
('osuser', models.ForeignKey(verbose_name='operating system user', to='osusers.User')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'website',
|
||||
'verbose_name_plural': 'websites',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='website',
|
||||
unique_together=set([('domain', 'subdomain')]),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue