Reference Project¶
For convenience, we provide a reference project which implements all of the conventional user-flows for sign up,
sign in and account management. Feel free to use this project to guide your implementation of django_flex_user
.
You can try a live version of the reference project here. Or, you can run the reference project on your local machine.
Running the reference project locally¶
Clone the git repository:
$ mkdir django-flex-user $ cd django-flex-user $ git clone https://github.com/ebenh/django-flex-user
Create an
.env
file with the following contents:DEBUG=1 SECRET_KEY=NOT_FOR_PRODUCTION_x-)pi_7=*sqrnqeo!!p*986207*n4-!4xa&hd(lq&@@p0m=4*( SENDGRID_API_KEY=... SOCIAL_AUTH_FACEBOOK_KEY=... SOCIAL_AUTH_FACEBOOK_SECRET=... SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=... SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=...
Install dependencies:
$ python -m pipenv install --dev
Note
On Windows, the command to execute Python is
py
.Activate the
pipenv
shell:$ python -m pipenv shell
Initialize database tables:
$ python manage.py migrate
Create a super user:
$ python manage.py createsuperuser
Run the development server:
$ python manage.py runserver
Run tests:
$ python manage.py test
Build the Python package:
$ python setup.py sdist
Build the docs:
$ cd doc $ sphinx-apidoc -o source ../django_flex_user ../django_flex_user/tests ../django_flex_user/migrations $ make html
Note
If you’re running Git Bash on Windows, the last command should be
./make.bat html