A first very basic import.

Contains basic functionality, and an import of most of the static content
from the old site.

There is still plenty more to do...
This commit is contained in:
Magnus Hagander
2009-09-14 14:39:25 +02:00
commit 90b758c247
199 changed files with 6805 additions and 0 deletions

30
pgweb/core/models.py Normal file
View File

@ -0,0 +1,30 @@
from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import pre_save
class Version(models.Model):
tree = models.DecimalField(max_digits=3, decimal_places=1, null=False, blank=False)
latestminor = models.IntegerField(null=False, blank=False, default=0)
reldate = models.DateField(null=False, blank=False)
relnotes = models.CharField(max_length=32, null=False, blank=False)
def __unicode__(self):
return "%s.%s" % (self.tree, self.latestminor)
class Meta:
ordering = ('-tree', )
class Country(models.Model):
name = models.CharField(max_length=100, null=False, blank=False)
tld = models.CharField(max_length=3, null=False, blank=False)
class Meta:
db_table = 'countries'
ordering = ('name',)
verbose_name = 'Country'
verbose_name_plural = 'Countries'
def __unicode__(self):
return self.name