Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tawounfouet/django-cars-listing-project
Step By Step Developing a Real Car Listing project with Django & PostgreSQL, then Deploy on Heroku
https://github.com/tawounfouet/django-cars-listing-project
css django html javascript python3
Last synced: 2 days ago
JSON representation
Step By Step Developing a Real Car Listing project with Django & PostgreSQL, then Deploy on Heroku
- Host: GitHub
- URL: https://github.com/tawounfouet/django-cars-listing-project
- Owner: tawounfouet
- Created: 2022-01-03T10:50:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T20:44:53.000Z (about 1 year ago)
- Last Synced: 2023-11-15T18:59:38.633Z (about 1 year ago)
- Topics: css, django, html, javascript, python3
- Language: JavaScript
- Homepage: https://www.udemy.com/course/python-django-real-project-for-freshers-freelancers/
- Size: 22.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Django Carzone Project
### 1. Create a virtual environment and install dependencies
```
python3 -m venv venv
# or virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
```### 2. Create a .env file in the root directory and add the following
```
SECRET_KEY=your_secret_key
DEBUG=True
```### 3. Run the server
```
python manage.py runserver
```### 4. Create a superuser
```
python manage.py createsuperuser
```### 5. Visit the admin panel
```
http://localhost:8000/admin
```## Static files Configuration
Go to settings.py and add the following
```python
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')# for carzone project
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'static'
STATICFILES_DIRS = [
BASE_DIR / 'carzone/static',
]```
### 6. Run the following command to collect static files
```python
python manage.py collectstatic
```