[Answer]-Django: installing software with pip, then editing the apps installed

1đź‘Ť

welcome to the world of Django! I highly recommend going through the django tutorial if you are new to django; it can help answer some questions on where the code for components, like templates, should be placed.

In your settings file, you need to set TEMPLATE_DIRS, as shown here. Create a folder in your project directory, called templates. Within that folder, create one called registration. You can then put a login.html template there (so it’s at the path templates/registration/login.html).

This github project also has default templates for django-registration: https://github.com/yourcelf/django-registration-defaults

👤Sohan Jain

0đź‘Ť

You need to add the “registration” App to your list of installed as as stated in the Docs like so:

INSTALLED_APPS = (
    # ...other installed applications...
    'registration',)

ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.

Then run “syncdb” command just to make sure after that:

python manage.py syncdb

This will sync the App to your current web App if there is any database parts that need to be synced.

The main question though…. about how does Django look for the “registration” App if it is not in your current project? Well, Python actual does that, it looks in your Python library in “site-packages”. After installing you will see the “registraion” app there. That’s the directories that it uses.

Leave a comment