On 26 sep, 18:19, gv <[EMAIL PROTECTED]> wrote:
> Oops - I just saw the relevant bit in the tutorial, so it is done like
> this:
>
> class Server(models.Model):
> def __unicode__(self):
> return self.question
The answer is 42 !-)
--~--~-~--~~~---~--~---
You might want to remove the id field as it's not needed. You also
might consider converting siteid and authid to ForeignKey fields to
the Model that corresponds to the table that these fkeys are
referencing. So if you have Auth and Site models, you could do:
site = models.ForeignKey(Site,
Oops - I just saw the relevant bit in the tutorial, so it is done like
this:
class Server(models.Model):
def __unicode__(self):
return self.question
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hello
I'm making a small app that holds data of servers in our organisation
(the database existed previously, and I've created the models.py using
the inspectdb as described in:
http://docs.djangoproject.com/en/dev/howto/legacy-databases/ )
The admin site works OK, but each server is displayed
4 matches
Mail list logo