Thursday, September 2, 2010

Django + Plugins howto?

Hello, I'm creating the system, which will rely on plugins.
For instance, I have main application with model:
class User(models.Model):
ContractNum = models.PositiveIntegerField(unique=True, blank=True,
null=True )
LastName = models.CharField(max_length=50)
FirstName = models.CharField(max_length=50,)

in application billing

I want to create plugin, in case it's installed (let say in
settings.py), it adds new attributes of User class and User model
virtually become:
class User(models.Model):
ContractNum = models.PositiveIntegerField(unique=True, blank=True,
null=True )
LastName = models.CharField(max_length=50)
FirstName = models.CharField(max_length=50,)
Balance = models.IntegerField(),

etc
and in Admin interface it's become like I've created User model as in
second case.

Could you please let me know how to acheave it?
Thank you.

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate