NOTE: This open source project is built using DjangoX as template.
- Django 2.2 & Python 3.6
- Custom user model
- Email/password for user registration and log in
- Static files properly configured, including Favicon
- User Profile auto-create, view, and edit
- Leaflet Map to locate user Profile
- django-allauth for authentication
- Bootstrap for UI
- django-debug-toolbar for debugging
- django-crispy-forms for DRY forms
- django-leaflet for displaying Leaflet map
- dj-database-url for easy database settings
- python-decouple for settings separation from code
- Leaflet.fullscreen for showing fullscreen Leaflet map
- Leaflet.markercluster for grouping Leaflet marker
-
Make sure Python 3.6x, Pip, and Virtualenv are already installed. See here and here for help.
-
Make sure PostGIS (and PostgreSQL) is already installed (See here). You can also use Kartoza PostGIS docker. See here for help
-
Because we want to run Django with PostgreSQL, we need to install required prerequisites.
$ sudo apt install libpq-dev python3-dev python3.6-dev
- Clone the repo and configure the virtual environment:
$ git clone https://github.com/zamuzakki/gis-portfolio.git
$ cd gis-portfolio
$ virtualenv --python=/usr/bin/python3.6 venv
$ source /venv/bin/activate
(venv) $ pip3 install -r requirements.txt
-
Configure environment variables using
.env
file. Check.env_example
here. -
Set up the initial migration for our custom user models in
users
and migrate the database.
(venv) $ python manage.py makemigrations users
(venv) $ python manage.py makemigrations
(venv) $ python manage.py migrate
- Create a superuser:
(venv) $ python manage.py createsuperuser
- Run test.
(venv) $ python manage.py test
- Confirm everything is working:
(venv) $ python manage.py runserver
-
Load the site at http://localhost:8000.
-
Create some Expertise object to be used in Profile via admin page
- This app uses
django.core.mail.backends.console.EmailBackend
by default, so instead of being sent, the email is printed on the console. You can update EMAIL_BACKEND to configure an SMTP backend - User created from signup will have
is_staff
field set toTrue
, so they can login to admin page only to edit their own Profile.