Skip to content

Commit 764664f

Browse files
authored
Merge pull request #912 from Trafire/django-taggit-911
Sample App Enhancements
2 parents d8889a6 + 4256ce3 commit 764664f

39 files changed

+21743
-98
lines changed

CONTRIBUTING.rst

+33-3
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,40 @@ Running the sample application
4848

4949
There is a sample application in ``sample_taggit``. You can run it by doing the following:
5050

51-
- Run migrations with ``sample_taggit/manage.py migrate``
52-
- Make yourself a superuser with ``sample_taggit/manage.py createsuperuser`` (this should let you use the admin with ease)
53-
- Launch the sample project itself with ``sample_taggit/manage.py runserver``
5451

52+
**Prepare the Database**
53+
~~~~~~~~~~~~~~~~~~~~~~~~
54+
55+
Use the `reset-db` command to prepare your database. This will remove any existing data, run migrations, and load fixtures, including creating a default admin user.
56+
57+
**On Windows:**
58+
59+
.. code-block:: console
60+
61+
cd sample_taggit
62+
call make.bat reset-db
63+
64+
**On Mac/Linux:**
65+
66+
.. code-block:: console
67+
68+
cd sample_taggit
69+
make reset-db
70+
71+
**Launch the Sample Project**
72+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+
74+
Launch the sample project itself with:
75+
76+
.. code-block:: console
77+
78+
sample_taggit/manage.py runserver
79+
80+
**Default Admin User Login:**
81+
82+
Username: taggit
83+
84+
Password: admin
5585

5686
Follow style conventions (black, flake8, isort)
5787
-----------------------------------------------

sample_taggit/admin.py

-5
This file was deleted.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"model": "auth.user",
4+
"pk": 1,
5+
"fields": {
6+
"password": "pbkdf2_sha256$720000$KnQUl5xpmqQF2aWaANeHIG$kO4C7iRjRpDfUNwWgvXyCtmfoCQqOHUTHCO2IvrH58U=",
7+
"last_login": "2024-07-28T13:26:52.011Z",
8+
"is_superuser": true,
9+
"username": "taggit",
10+
"first_name": "",
11+
"last_name": "",
12+
"email": "",
13+
"is_staff": true,
14+
"is_active": true,
15+
"date_joined": "2024-07-27T17:02:40.676Z",
16+
"groups": [],
17+
"user_permissions": []
18+
}
19+
}
20+
]

0 commit comments

Comments
 (0)