Loading...
Django web framework with ORM and admin panel
Navigate to your downloaded project directory
cd your-project-nameCreate a virtual environment
python -m venv venvActivate the virtual environment
source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies
pip install -r requirements.txtRun database migrations
python manage.py migrateStart the development server
python manage.py runserverYour Django project uses the standard structure with color variables in static/css/style.css.
Make sure STATIC_URL and STATICFILES_DIRS are configured in settings.py.
All colors are defined in your CSS file:
:root {
--primary: /* Your primary color */;
--secondary: /* Your secondary color */;
--accent: /* Your accent color */;
--text-on-primary: /* Text color for primary bg */;
--text-on-secondary: /* Text color for secondary bg */;
--text-on-accent: /* Text color for accent bg */;
}In your templates, load static files:
{% load static %}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>Apply colors in your Django templates:
<div style="background-color: var(--primary); color: var(--text-on-primary);">
<h1>Primary Section</h1>
</div>
<button class="btn-accent">
Call to Action
</button>Create reusable CSS classes:
.btn-accent {
background-color: var(--accent);
color: var(--text-on-accent);
}
.card {
background-color: var(--secondary);
color: var(--text-on-secondary);
}