pawamoy/django-suit-dashboard

Improve documentation

Closed this issue · 0 comments

  • Dashboard JS and included templates: javascript content using libraries loaded in a custom base template must be included in $(document).ready(function() {...}) or $(function() {...}). Scripts must be run only once the libraries have been loaded.
  • What to json.dumps or not: widget's content, if needed for javascript code, should be returned as JSON string, while widget's get_updated_content must not return JSON string but instead Python object (automatically serialized through AJAX call).
  • Document behaviour when overriding get method thanks to inheritance: assigning values to self attributes instead of modifying them will break the views since returning super will use the top-most view's assignment. Maybe show an example on how to concatenate crumbs inside successive get.
  • Relation does not exist at migrate: if the views access objects before the database has been created, it results in an error. To avoid this, move access into get method, migrate the db and then optionally move access back into class definition.
  • Introduction: explain briefly what is the purpose of suit-dashboard and how it works.