Hi all!
In my application i have mutable and immutable components.
After sync_db command i use post_syncdb singal to create table with
info about this components.
How to pass new attr about component to register_component function
established with post_syncdb signal?
code:
# Page models are immutable
signals.post_syncdb.connect(register_component, sender=page_models, #
where to put info about is_mutable=False)
# Posts models are mutable
signals.post_syncdb.connect(register_component, sender=post_models, #
where to put info about is_mutable=True)
def register_component(app, created_models, verbosity, **kwargs):
"""
Registers components.
"""
# if immutable
# component = Component(name=app, area=0, is_mutable=False)
# if mutable
# else:
# component = Component(name=app)
component.save()
thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.