This project provides an optimal environment for contributing to Django Admin.
It provides the following features:
- Before/After Comparison Pages(Access the "/compare" path.)
- Various Admin Use Cases
- Initial Data for Testing
- Provides images for visual regression testing via screenshots (planned)
- Automated generation of admin images for the Django Project documentation (planned)
-
Clone django repo
git clone https://github.com/django/django.git
-
Clone this repo into the django folder
cd django git clone https://github.com/Antoliny0919/django-admin-playground.git
Warning
If you cloned django-admin-playground into a different path within the django folder, you need to update the values in the following files:
-
Create your virtual environment
python -m venv venv source venv/bin/activate
Note
If a virtual environment already exists in the cloned Django folder, you can use that environment and skip this step without any issues.
-
Install requirements
pip install -r requirements.txt
-
Run migrations
python manage.py migrate
-
Add initial data
python manage.py loaddata auth_fixture.json changelist_fixture.json form_fixture.json inline_fixture.json
Tip
django-admin-playground provides a superuser by default.
- Username:
admin
- Password:
admin
- Run server 🚀
python manage.py runserver
-
Add test cases.
django-admin-playground welcomes values or settings that can create visual differences in the Django Admin. Please add a ModelAdmin or fixture with specific values that can create visual differences. (Refer to this document for instructions on how to add fixtures.)
-
Keep Django Admin templates up-to-date.
The before_admin template folder must always stay up-to-date with the latest Django Admin templates. If there are any changes in the Django Admin templates, the template files in the
before_admin
folder must be kept identical. If the Django Admin templates have been modified, please reflect those changes in thebefore_admin
templates! -
Feature improvements
django-admin-playground aims to create the optimal environment for contributing to Django Admin. If you have any ideas or items that could improve the contribution environment, don’t hesitate to create an Issue.
Finally, I would like to thank everyone who has contributed to Django and django-admin-playground ❤️