Demo Site¶
The repository includes a demo Django project that showcases all features of Django Gentelella Widgets.
Quick Start with Make¶
The fastest way to run the demo is using the provided Makefile commands:
# Clone the repository
git clone https://github.com/Solvosoft/django-gentelella-widgets.git
cd django-gentelella-widgets
# Create and activate virtual environment
python3.11 -m venv env
source env/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install requests
# Initialize demo (migrate, create data, menu, superuser)
make init_demo
# Load static assets
cd demo && python manage.py loaddevstatic && cd ..
# Run the server
make run
Then visit http://localhost:8000/ in your browser.
Available Make Commands¶
The Makefile provides several useful commands:
Command |
Description |
|---|---|
|
Full setup: migrate, create demo data, menu, and superuser |
|
Start the development server |
|
Run makemigrations and migrate |
|
Regenerate the sidebar menu |
|
Run the test suite |
|
Check code style with pycodestyle |
|
Build Sphinx documentation |
|
Remove build artifacts and compiled files |
|
Extract translatable strings |
|
Compile translations |
Manual Setup¶
If you prefer to set up the demo manually, follow these steps:
1. Create Virtual Environment¶
python3.11 -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
2. Install Dependencies¶
pip install -r requirements.txt
pip install requests
3. Run Migrations¶
cd demo
python manage.py migrate
4. Create Demo Data¶
python manage.py createdemo
6. Load Static Assets¶
python manage.py loaddevstatic
7. Create Superuser (Optional)¶
python manage.py createsuperuser
8. Run Development Server¶
python manage.py runserver
Demo Features¶
The demo site includes examples of:
Forms & Widgets
All core input widgets (text, number, email, etc.)
Select widgets with Select2 integration
Date and time pickers
File upload with chunked upload support
Masked inputs (phone, credit card, etc.)
WYSIWYG editors (TinyMCE, MarkItUp)
Data Tables
Server-side pagination
Column filtering
Global search
Sorting
Export functionality
CRUD Views
List, Create, Update, Delete views
Permission management
Pagination options
Search and filtering
Advanced Features
Blog system
Notification system
History/audit trail
Trash/soft delete
Digital signatures
Demo Credentials¶
If you used make init_demo, you were prompted to create a superuser.
For admin access, visit http://localhost:8000/admin/ and log in with your superuser credentials.
Running Tests¶
Run the test suite to verify everything is working:
make test
Or manually:
cd demo
python manage.py test
For Selenium tests (requires browser driver):
cd demo
python manage.py test demoapp.tests.selenium