1 from django
.db
import models
2 from django
.contrib
.auth
.models
import User
4 class Mirror(models
.Model
):
5 id = models
.AutoField(primary_key
=True)
6 domain
= models
.CharField(maxlength
=255)
7 country
= models
.CharField(maxlength
=255)
8 url
= models
.CharField(maxlength
=255)
9 protocol_list
= models
.CharField(maxlength
=255, null
=True, blank
=True)
10 admin_email
= models
.CharField(maxlength
=255, null
=True, blank
=True)
14 db_table
= 'common_mirror'
16 list_display
= ('domain', 'country')
17 list_filter
= ('country',)
19 search_fields
= ('domain')
22 class Donator(models
.Model
):
23 id = models
.AutoField(primary_key
=True)
24 name
= models
.CharField(maxlength
=255)
28 db_table
= 'common_donator'
31 search_fields
= ('name')
34 class UserProfile(models
.Model
):
35 id = models
.AutoField(primary_key
=True) # not technically needed
36 notify
= models
.BooleanField("Send notifications", default
=True, help_text
="When enabled, user will recieve 'flag out of date' notifications")
37 alias
= models
.CharField(core
=True, maxlength
=50, help_text
="Required field")
38 public_email
= models
.CharField(core
=True, maxlength
=50, help_text
="Required field")
39 other_contact
= models
.CharField(maxlength
=100, null
=True, blank
=True)
40 website
= models
.URLField(null
=True, blank
=True)
41 yob
= models
.IntegerField(null
=True, blank
=True)
42 location
= models
.CharField(maxlength
=50, null
=True, blank
=True)
43 languages
= models
.CharField(maxlength
=50, null
=True, blank
=True)
44 interests
= models
.CharField(maxlength
=255, null
=True, blank
=True)
45 occupation
= models
.CharField(maxlength
=50, null
=True, blank
=True)
46 roles
= models
.CharField(maxlength
=255, null
=True, blank
=True)
47 favorite_distros
= models
.CharField(maxlength
=255, null
=True, blank
=True)
48 picture
= models
.FileField(upload_to
='devs', default
='devs/silhouette.png')
49 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)
51 db_table
= 'user_profiles'
52 verbose_name
= 'Additional Profile Data'
53 verbose_name_plural
= 'Additional Profile Data'
55 # vim: set ts=4 sw=4 et: