- ⚠ NOTE! ⚠ : These instructions are targeting DEVELOPMENT machines and are INSECURE for production.
-
Note: This also creates a superuser user called
local_gallery
. -
Make sure your database is running.
-
Linux:
sudo -u postgres createuser -s local_gallery sudo -u postgres psql -c "alter user local_gallery with encrypted password 'local_gallery';" sudo -u postgres createdb local_gallery -O local_gallery
-
Windows (supply password for postgres user):
createuser --username=postgres -s local_gallery psql --username=postgres -c "alter user local_gallery with encrypted password 'local_gallery';" createdb --username=postgres local_gallery -O local_gallery
-
Clone the repository:
git clone https://github.com/LocalGallery/local_gallery.git
-
Create a virtual env and install required Python packages:
pipenv install
-
Activate the virtualenv:
pipenv shell Your python is here (needed for pycharm): * linux: which python * Windows: where python
-
Reset, migrate and populate database:
python manage.py reset_db python manage.py migrate python manage.py populate_db
-
Create an admin account:
python manage.py createsuperuser
Run the server:
python manage.py runserver