Hello there. I get the impression, after reading the Auth / User stuff
that comes with Django, extending models is not the best way of adding
functionality. I've been using photologue for my e-commerce project.
I'd like to extend Photo and Gallery but I seem to be hitting a lot of
errors here and there. I suspect its not quite as simple as simply
extending the model:

from django.db import models
from contact.models import Contact
from photologue.models import Gallery
from django.contrib.auth.models import User


class Portfolio(Gallery):
        css_style = models.TextField()
        owner = models.ForeignKey(User, unique=True, blank=False, null=False)

        class Admin:
                list_display = ('title','pub_date','owner')
        list_filter = ['pub_date']
        ordering = ['title']

I guess this probably wont work very well. The admin side certainly
complains though the database model looks fine to be fair. Is there
something im missing here or should i just create another class based
on models.Model and implement a foreignkey relationship
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to