This is a repository for a web application developed with Django, built with Crowdbotics
..
├── home # Starter home app
├── modules # Crowdbotics Modules app
├── holland_insurance_g_29700 # Django project configurations
├── static # Static assets
├── users # Starter users app
├── web_build # React Native Web build
├── ...
├── README.md
└── ...
- 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 holland_insurance_g_29700
-
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) directory 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 holland_insurance_g_29700
- 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
Admin Panel can be accessed through http://localhost:8000/admin/. If you are the Project Owner, admin credentials can be generated from App > Settings on Crowdbotics App Dashboard. If not, please request your PM or Project Owner to generate admin credentials and share with you.
API Documentation is generated automatically and can be access through http://localhost:8000/api-docs/. Please make sure you are signed in to the admin panel before navigating to this page.