README.rst 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_crud %}{% load rapid_filters %}
  20. {% register_filters %}
  21. {% register_overlay %}
  22. {% load rapid_menu %}
  23. {% menu request %}
  24. {% block body %}{% endblock %}
  25. <script src="link to the jquery-form plugin">
  26. </body>
  27. </html>
  28. A menu will be generated in a unumbered list (UL) at the "menu" tag, and the
  29. registered data will be placed at the "body" block.
  30. After that, one must register actions. For that, the module "rapid.views" has three helper functions:
  31. "register_model", "register_instance_form", and "register_simple_select".
  32. Use "register_model" for creating default actions for listing, viewing, editing, addin, and optionally
  33. removing objects of a model.
  34. Use "register_instance_form" for creating custom actions where users submit a form, and act upon
  35. instances of a model. The form may not be a ModelForm, but must implement the save() method.
  36. Use "register_simple_select" for enabling the rapid select widget for all generated edit forms
  37. with fields that select the registered model (that is, foreign key, one to one, and one to many
  38. fields, besides reverse relationships).
  39. The module "rapid.permissions" includes helper functions for managing user permissions on the
  40. registered actions. Permmissions may be managed for entire models and for instances (but not
  41. columns yet).