diff options
author | eliott <eliott@cactuswax.net> | 2008-03-08 00:13:41 -0800 |
---|---|---|
committer | eliott <eliott@cactuswax.net> | 2008-03-08 00:13:41 -0800 |
commit | 9b7b5122544283fc32d81d785e94c5f4aacc0109 (patch) | |
tree | ba117f7fadc24737920fa4f1b9a711157e629cc5 /devel | |
parent | 7e2d0f2f0cd8f176cf82c02d704ad4fe25a07b3b (diff) |
Moved models around
Diffstat (limited to 'devel')
-rw-r--r-- | devel/models.py | 56 | ||||
-rw-r--r-- | devel/views.py | 10 |
2 files changed, 3 insertions, 63 deletions
diff --git a/devel/models.py b/devel/models.py deleted file mode 100644 index d78989f5..00000000 --- a/devel/models.py +++ /dev/null @@ -1,56 +0,0 @@ -from django.db import models -from django.contrib.auth.models import User - -class Mirror(models.Model): - id = models.AutoField(primary_key=True) - domain = models.CharField(maxlength=255) - country = models.CharField(maxlength=255) - url = models.CharField(maxlength=255) - protocol_list = models.CharField(maxlength=255, null=True, blank=True) - admin_email = models.CharField(maxlength=255, null=True, blank=True) - def __str__(self): - return self.domain - class Meta: - db_table = 'common_mirror' - class Admin: - list_display = ('domain', 'country') - list_filter = ('country',) - ordering = ['domain'] - search_fields = ('domain') - pass - -class Donator(models.Model): - id = models.AutoField(primary_key=True) - name = models.CharField(maxlength=255) - def __str__(self): - return self.name - class Meta: - db_table = 'common_donator' - class Admin: - ordering = ['name'] - search_fields = ('name') - pass - -class UserProfile(models.Model): - id = models.AutoField(primary_key=True) # not technically needed - notify = models.BooleanField("Send notifications", default=True, help_text="When enabled, user will recieve 'flag out of date' notifications") - alias = models.CharField(core=True, maxlength=50, help_text="Required field") - public_email = models.CharField(core=True, maxlength=50, help_text="Required field") - other_contact = models.CharField(maxlength=100, null=True, blank=True) - website = models.URLField(null=True, blank=True) - yob = models.IntegerField(null=True, blank=True) - location = models.CharField(maxlength=50, null=True, blank=True) - languages = models.CharField(maxlength=50, null=True, blank=True) - interests = models.CharField(maxlength=255, null=True, blank=True) - occupation = models.CharField(maxlength=50, null=True, blank=True) - roles = models.CharField(maxlength=255, null=True, blank=True) - favorite_distros = models.CharField(maxlength=255, null=True, blank=True) - picture = models.FileField(upload_to='devs', default='devs/silhouette.png') - user = models.ForeignKey(User, edit_inline=models.STACKED, num_in_admin=1, min_num_in_admin=1, max_num_in_admin=1, num_extra_on_change=0, unique=True) - class Meta: - db_table = 'user_profiles' - verbose_name = 'Additional Profile Data' - verbose_name_plural = 'Additional Profile Data' - -# vim: set ts=4 sw=4 et: - diff --git a/devel/views.py b/devel/views.py index 65dde8ae..b073d29c 100644 --- a/devel/views.py +++ b/devel/views.py @@ -2,13 +2,9 @@ from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core import validators -from archweb_dev.lib.utils import render_response -from archweb_dev.packages.models import Package, Repo -from archweb_dev.todolists.models import Todolist, TodolistPkg -from archweb_dev.lib.utils import validate -from archweb_dev.devel.models import UserProfile -from archweb_dev.news.models import News -from archweb_dev.devel.models import Donator, Mirror +from archweb_dev.main.utils import render_response, validate +from archweb_dev.main.models import Package, Repo, Todolist, TodolistPkg +from archweb_dev.main.models import UserProfile, News, Donator, Mirror from django.http import HttpResponse from django.template import Context, loader |