README.rst 1.8 KB

  1. Rapid Django
  2. ============
  3. A set of opionated tools for rapid development of enterprise CRUD portals.
  4. Rapid Django generates CRUD pages and menus, based on a simple to use
  5. registry of models, forms and views.
  6. How to Use
  7. ==========
  8. Add the 'rapid' application to your installed apps, and run a database migration.
  9. Create a 'base.html' template that will be used by the CRUD generator. A minimum
  10. template looks as following:
  11. ::
  12. <DOCTYPE html>
  13. <html>
  14. <head>
  15. <link href="link to bootstrap" rel="stylesheet">
  16. <script src="link to jquery"></script>
  17. </head>
  18. <body>
  19. {% load rapid_menu %}
  20. {% menu request %}
  21. {% block body %}{% endblock %}
  22. <script src="link to the jquery-form plugin">
  23. </body>
  24. </html>
  25. A menu will be generated in a unumbered list (UL) at the "menu" tag, and the
  26. registered data will be placed at the "body" block.
  27. After that, one must register actions. For that, the module "rapid.views" has three helper functions:
  28. "register_model", "register_instance_form", and "register_simple_select".
  29. Use "register_model" for creating default actions for listing, viewing, editing, addin, and optionally
  30. removing objects of a model.
  31. Use "register_instance_form" for creating custom actions where users submit a form, and act upon
  32. instances of a model. The form may not be a ModelForm, but must implement the save() method.
  33. Use "register_simple_select" for enabling the rapid select widget for all generated edit forms
  34. with fields that select the registered model (that is, foreign key, one to one, and one to many
  35. fields, besides reverse relationships).
  36. The module "rapid.permissions" includes helper functions for managing user permissions on the
  37. registered actions. Permmissions may be managed for entire models and for instances (but not
  38. columns yet).