... | ... | @@ -4,7 +4,6 @@ We describe here the steps to add a new model NewModel inside the App applicatio |
|
|
* Create the NewModel model in App/models.py (don't forget to use the RevMixin and the AclMixin, and to define permissions)
|
|
|
* Register the NewModel inside App/admin.py
|
|
|
* Create a NewModelForm and a DelNewModelForm inside App/forms.py (using FormRevMixin and ModelForm). The DelNewModelForm may be unnecessary if the foreign key command the deletion of the model (on_delete=models.CASCADE).
|
|
|
* Add `'NewModel': App.models.NewModel,` to the MODEL_NAME variable of `/re2o/templatetags/acl.py`, if you want to test acls in templates
|
|
|
* Create, apply and commit the django migration
|
|
|
|
|
|
Then, you may define your views and template based on the other examples, and everything should be fine. |