How do I use this Django app correctly?
https://github.com/jtauber/django-notification/tree/555b506a3e225d476d17939d8b43f853fd0226ec/notification
OK, so this is what I did so far:
- Install this via setup.py install
- put "notification" in INSTALLED_APPS
- import notification in my views.py
After looking at the source code of that app, it seems like there is URLs.py inside the app. Also, there is a templates folder.
What do I do with these? I already have a urls.py in my project directory....so how do I point my current urls.py to that one?
Did I install this correctly? Was I supposed to copy the entire directory to m开发者_运维百科y project directory, instead of going through setup.py install?
Use setup.py, and install it into your project's virtualenv.
If you aren't using virtualenv for development, and probably deployment, then you should be.
Oh, and obligatory docs link for including urls.py: http://docs.djangoproject.com/en/dev/topics/http/urls/#including-other-urlconfs (hat-tip to Ignacio).
精彩评论