Compare commits
No commits in common. "832e39fcd7a8e28e6d13e97c82b1d1390309d2d9" and "9930bec65ad5887311515721c715b8229b41cbe7" have entirely different histories.
832e39fcd7
...
9930bec65a
@ -1 +0,0 @@
|
||||
3.9.0
|
20
README.md
20
README.md
@ -5,30 +5,14 @@ The AHosking.com API
|
||||
## Getting Started
|
||||
|
||||
###
|
||||
|
||||
1. `sudo apt install libpq-dev python-dev python3-psycopg2`
|
||||
1. `pip install virtualenv`
|
||||
1. `python3 -m virtualenv .env`
|
||||
1. Activate environment
|
||||
`.\.env\Scripts\activate`
|
||||
1. `export DEBUG=false`
|
||||
1. `docker run --name api-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=api -e POSTGRES_DB=api -p 5432:5432 -d postgres`
|
||||
1. ```
|
||||
export DATABASE_HOST=localhost
|
||||
export DATABASE_PORT=5432
|
||||
export DATABASE_USER=api
|
||||
export DATABASE_PASSWORD=mysecretpassword
|
||||
export DATABASE_NAME=api
|
||||
```
|
||||
1. `python3 manage.py makemigrations`
|
||||
1. `python3 manage.py migrate`
|
||||
1. `python3 manage.py createsuperuser`
|
||||
1. `python manage.py runserver 0.0.0.0:9000`
|
||||
1.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
`pip3 install --upgrade --force-reinstall -r requirements.txt` will re-install requirements and upgrade based on requirements.txt
|
||||
|
||||
### Third-party
|
||||
|
||||
- https://pypi.org/project/django-4-jet/
|
||||
* https://pypi.org/project/django-3-jet/
|
@ -29,7 +29,7 @@ SECRET_KEY = env("SECRET_KEY", default='django-insecure-7uajhmbt^@)mklk1ur=slkmn
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = env("DEBUG")
|
||||
|
||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "192.168.1.187", "192.168.1.23", "192.168.1.125", "0.0.0.0"]
|
||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "192.168.1.187", "192.168.1.23", "192.168.1.125"]
|
||||
|
||||
|
||||
# Application definition
|
||||
|
@ -13,7 +13,7 @@ Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.urls import path
|
||||
from django.conf.urls import url
|
||||
from django.contrib import admin
|
||||
from django.views.generic import TemplateView
|
||||
from django.urls import include, path
|
||||
|
@ -1,4 +1,4 @@
|
||||
from django.urls import path
|
||||
from django.conf.urls import url
|
||||
from django.contrib import admin
|
||||
from django.views.generic import TemplateView
|
||||
from django.urls import include, path
|
||||
|
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
Loading…
Reference in New Issue
Block a user