Get your EV Spot application up and running in minutes!
-
Run the setup script:
python setup.py
-
Follow the prompts to create a superuser and populate sample data
-
Start the server:
# Windows venv\Scripts\activate python manage.py runserver # macOS/Linux source venv/bin/activate python manage.py runserver
-
Open your browser and go to: http://localhost:8000
-
Create virtual environment:
python -m venv venv
-
Activate virtual environment:
# Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py makemigrations python manage.py migrate
-
Create superuser (optional):
python manage.py createsuperuser
-
Populate sample data (optional):
python manage.py populate_sample_data
-
Start the server:
python manage.py runserver
- ✅ Beautiful, responsive homepage
- ✅ Interactive map with Leaflet.js
- ✅ User authentication (login/register)
- ✅ Station search and filtering
- ✅ Real-time station availability
- ✅ Mobile-friendly design
- ✅ Django REST API
- ✅ User management system
- ✅ Charging station management
- ✅ Session tracking
- ✅ Reviews and ratings
- ✅ Admin panel
- ✅ 8 charging stations across different locations
- ✅ 5 sample users
- ✅ Multiple reviews and ratings
- ✅ Various charging types (slow, fast, super)
- Main Application: http://localhost:8000
- Admin Panel: http://localhost:8000/admin
- API Documentation: http://localhost:8000/api/
After running the sample data population, you can log in with:
- Username: user1, user2, user3, user4, user5
- Password: password123
The sample data includes stations at:
- Downtown EV Station
- Mall Parking Garage
- Highway Rest Stop
- University Campus
- Office Complex
- Residential Complex
- Shopping Center
- Airport Parking
- Edit the Django models in
stations/models.py - Run
python manage.py makemigrations - Run
python manage.py migrate - Restart the server
- Frontend: Edit templates in
templates/and static files instatic/ - Backend: Add views in
stations/views.pyand URLs instations/urls.py - API: Extend serializers in
stations/serializers.py
Port already in use:
python manage.py runserver 8001Database errors:
python manage.py migrate --run-syncdbStatic files not loading:
python manage.py collectstaticPermission errors (Linux/macOS):
chmod +x setup.py- Check the full README.md for detailed documentation
- Look at the Django error messages in the terminal
- Check the browser console for JavaScript errors
- Verify all dependencies are installed:
pip list
Your EV Spot application is now running! Explore the features:
- Browse the homepage and see the beautiful UI
- Try the interactive map to find charging stations
- Register a new account or use the sample users
- Explore the admin panel to manage data
- Test the API endpoints in your browser
Happy coding! ⚡🚗