User:Mjzffr: Difference between revisions

Jump to navigation Jump to search
1,162 bytes removed ,  1 May 2015
Remove resources
(Remove resources)
Line 1: Line 1:
== About ==
Please see my [https://mozillians.org/en-US/u/maja_zf/ Mozillians profile].
Please see my [https://mozillians.org/en-US/u/maja_zf/ Mozillians profile].
== Resources (Possibly out-of-date) ==
These links and wisdom were collected during my work on [[QA/OneandDone|One and Done]] during Summer 2014. It may be useful to future contributors. Maybe it can be moved to a Developer Resources page in the One and Done section of the wiki.
* [https://docs.djangoproject.com/en/dev/howto/initial-data/ Providing initial model data]: good to know if your local project database is empty.
* [https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-display/ Class-based generic views in Django]
=== Set up logging ===
In `oneanddone/settings/local.py` uncomment the assignment to `LOGGING` and add `import logging` above it, like so:
    import logging
    LOGGING = dict(loggers=dict(playdoh={'level': logging.DEBUG}))
This defines a logger called 'playdoh'.
As a result, your own debug messages will be displayed among the other messages shown when `python manage.py runserver` is running. Example:
    # views.py
    import logging
    log = logging.getLogger('playdoh')
    def myview(request):
        # ...
        # print to the console
        log.debug('%s got here' % request.user)
Confirmed users
378

edits

Navigation menu