AutoMax is a car listings platform where users can browse, post, and manage vehicles with ease. Whether you're selling your car or searching for one, AutoMax offers a clean and organized experience to make the process fast and convenient.
AutoMax is a modern, modular Django-based car listings platform designed with clean architecture and scalable development in mind.
The project includes:
-
A
mainlistings app for managing and displaying car posts -
A
usersapp for authentication, registration, and user profiles -
Environment variable management using django-environ and a project-level .env file
-
Production-ready structure with support for static files, .env isolation, and a clear directory layout
-
AutoMax serves as both a practical Django learning project and a foundation for building advanced automotive marketplace solutions.
π Live Demo:
π https://vinaymalyala-automax.onrender.com
π https://vinaymalyala.pythonanywhere.com/
src/β Django project root (this repository)src/automax/β Django settings and WSGI/ASGI setupsrc/main/β Main application for listingssrc/users/β User authentication/profile apprequirements.txtβ Python dependencies
- Python 3.11+ (project used 3.13 in VS Code settings)
- pip
- (Optional) Visual Studio Code + Python extension
- Git (if you want to clone this repository)
git clone https://github.com/VinayMalyala/AutoMax.git- Create and activate a virtual environment:
python -m venv venv
& "venv\Scripts\Activate.ps1"- Install dependencies:
pip install -r requirements.txt- Environment variables β
.envfile
This project uses a .env file located in automax/.env (relative to src/) for sensitive values like SECRET_KEY and DEBUG.
Create src/automax/.env and add (example):
SECRET_KEY=your-secret-key-here
DEBUG=True
# Additional vars if you use them:
# DATABASE_URL=sqlite:///db.sqlite3
# OTHER_VAR=value
ENV_INJECTION_TEST=1
β‘οΈ Never commit .env to Git.
Important: Keep your real SECRET_KEY private and never commit .env to version control. Add it to .gitignore.
- Database migrations and superuser
python manage.py migrate
python manage.py createsuperuser- Collect static (if relevant for your environment/deployment)
python manage.py collectstatic --noinput- Run the development server
python manage.py runserverOpen http://127.0.0.1:8000/ in your browser.
- Project contains a workspace setting
src/.vscode/settings.jsonwith:
{
"python.terminal.useEnvFile": true,
"python.envFile": "${workspaceFolder}/automax/.env"
}This should make the integrated terminal pick up variables from automax/.env. If ENV_INJECTION_TEST is present, verify it in a new terminal:
echo $Env:ENV_INJECTION_TEST
python -c "import os; print(os.getenv('ENV_INJECTION_TEST'))"If the terminal shows None, try the following steps:
- Close all integrated terminals, reload the VS Code window (Command Palette β Developer: Reload Window), and open a new terminal.
- Ensure the Python extension is enabled (View β Extensions).
- Make sure
python.envFilepath is correct (either workspace or user settings). We include both workspace and user-level settings for convenience.
If VS Code still doesn't inject env values, you can manually load them into a terminal session (example PowerShell script):
Get-Content 'd:\All Folders\VS CODE\Django\django_app_udemy\src\automax\.env' | ForEach-Object {
if ($_ -and -not ($_ -match '^\s*#')) {
$parts = $_ -split '='
$name = $parts[0].Trim()
$value = ($parts[1..($parts.Length-1)] -join '=').Trim()
Set-Item -Path "Env:$name" -Value $value
}
}This loads .env variables for the current PowerShell session (process scope).
- Activate venv:
& "venv\Scripts\Activate.ps1" - Install deps:
pip install -r requirements.txt - Migrate:
python manage.py migrate - Create superuser:
python manage.py createsuperuser - Run dev server:
python manage.py runserver - Tests:
python manage.py test
- This project includes
whitenoisefor static asset serving in production β adjustALLOWED_HOSTS, setDEBUG=False, and configureSTATIC_ROOTbefore deploying. - Use a proper secret-management solution (e.g. environment variables in CI/CD or secrets manager) instead of
.envin production.
automax/settings.pyusesdjango-environto load environment variables. The project explicitly loadsautomax/.envso Django reads the same.envused by your IDE's terminals.- Important apps:
main(listings),users(authentication & profiles), and the usual Django stack.
- If
python manage.pyreports Django not installed, ensure your virtual environment is activated andpip install -r requirements.txtwas run. - If env variables are missing for the terminal session, reload VS Code and open a new terminal to force re-read of env files.
- For PowerShell 'variable parsing' errors when manually setting env variables, use
Set-Item -Path "Env:<NAME>" -Value <value>or the[System.Environment]::SetEnvironmentVariable(...)approach.



