This is a repository for a web application developed with Django, built with Crowdbotics
- Local Authentication using email and password with allauth
- Rest API using django rest framework
- Forgot Password
- Bootstrap4
- Toast Notification
- Inline content editor in homepage
Following are instructions on setting up your development environment.
The recommended way for running the project locally and for development is using Docker.
It's possible to also run the project without Docker.
This project is set up to run using Docker Compose by default. It is the recommended way. You can also use existing Docker Compose files as basis for custom deployment, e.g. Docker Swarm, kubernetes, etc.
-
Install Docker:
- Linux - get.docker.com
- Windows or MacOS - Docker Desktop
-
Clone this repo and
cd video_22705
-
Make sure
Pipfile.lock
exists. If it doesn't, generate it with:$ docker run -it --rm -v "$PWD":/django -w /django python:3.7 pip3 install --no-cache-dir -q pipenv && pipenv lock
-
Use
.env.example
to create.env
:$ cp .env.example .env
-
Update
.env
anddocker-compose.override.yml
replacing all<placeholders>
-
Start up the containers:
$ docker-compose up
This will build the necessary containers and start them, including the web server on the host and port you specified in
.env
.Current (project) directroy will be mapped with the container meaning any edits you make will be picked up by the container.
-
Seed the Postgres DB (in a separate terminal):
$ docker-compose exec web python3 manage.py makemigrations $ docker-compose exec web python3 manage.py migrate
-
Create a superuser if required:
$ docker-compose exec web python3 manage.py createsuperuser
You will find an activation link in the server log output.
- Install pipenv
- Clone this repo and
cd video_22705
- Run
pip install --user --upgrade pipenv
to get the latest pipenv version. - Run
pipenv --python 3.6
- Run
pipenv install
- Run
cp .env.example .env
- Update .env file
DATABASE_URL
with yourdatabase_name
,database_user
,database_password
, if you use postgresql. Can alternatively set it tosqlite:////tmp/my-tmp-sqlite.db
, if you want to use sqlite for local development.
- Run
pipenv shell
- Run
python manage.py makemigrations
- Run
python manage.py migrate
- Run
python manage.py runserver