X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=comicsporn%2Fmodels.py;h=e162d0447e8a5383b4c9fc7c3ab930856c56a82c;hb=315e96d4c9aa127e9266eea5d45a90903f178b2a;hp=0cea8c997e0274ae2acb65162a5bf9aa898c7dde;hpb=298255d2254e2dd9c80e3378493cd296e1d54ba1;p=webcomics.git diff --git a/comicsporn/models.py b/comicsporn/models.py index 0cea8c9..e162d04 100644 --- a/comicsporn/models.py +++ b/comicsporn/models.py @@ -1,7 +1,8 @@ -from django.db import models from django.contrib.auth.models import User +from django.db import models from django.utils.translation import ugettext_lazy as _ + # A very basic data model to begin with # TODO: # - Create sensible default options with translation; @@ -9,7 +10,6 @@ from django.utils.translation import ugettext_lazy as _ # - Ensure pertinence of the comics building way : block by block; # - Test upload to images file outside the DB ...; # - ... - class Style(models.Model): """ TODO: The choice list should be in DB @@ -35,12 +35,12 @@ class UserProfile(models.Model): The default behaviour of class inheritance is to create OnetoOne relationship between parent and child TODO: Which fields are required to interact with the ads publisher ? """ - ADS_PUBLISHER_CHOICES = ( - ('AS', 'Advert Stream'), - ('TJ', 'Traffic Junky'), - ) - ads_publisher = models.CharField(max_length=50, choices=ADS_PUBLISHER_CHOICES) - ads_publisher_login = models.CharField(max_length=50) + ADS_PUBLISHER_CHOICES = ( + ('AS', 'Advert Stream'), + ('TJ', 'Traffic Junky'), + ) + ads_publisher = models.CharField(max_length=50, choices=ADS_PUBLISHER_CHOICES) + ads_publisher_login = models.CharField(max_length=50) class Meta: verbose_name = _('User profile')