Skip to content

Commit

Permalink
Merge pull request #912 from Trafire/django-taggit-911
Browse files Browse the repository at this point in the history
Sample App Enhancements
  • Loading branch information
rtpg committed Aug 12, 2024
2 parents d8889a6 + 4256ce3 commit 764664f
Show file tree
Hide file tree
Showing 39 changed files with 21,743 additions and 98 deletions.
36 changes: 33 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,40 @@ Running the sample application

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

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

**Prepare the Database**
~~~~~~~~~~~~~~~~~~~~~~~~

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.

**On Windows:**

.. code-block:: console
cd sample_taggit
call make.bat reset-db
**On Mac/Linux:**

.. code-block:: console
cd sample_taggit
make reset-db
**Launch the Sample Project**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Launch the sample project itself with:

.. code-block:: console
sample_taggit/manage.py runserver
**Default Admin User Login:**

Username: taggit

Password: admin

Follow style conventions (black, flake8, isort)
-----------------------------------------------
Expand Down
5 changes: 0 additions & 5 deletions sample_taggit/admin.py

This file was deleted.

20 changes: 20 additions & 0 deletions sample_taggit/fixtures/0001_users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"model": "auth.user",
"pk": 1,
"fields": {
"password": "pbkdf2_sha256$720000$KnQUl5xpmqQF2aWaANeHIG$kO4C7iRjRpDfUNwWgvXyCtmfoCQqOHUTHCO2IvrH58U=",
"last_login": "2024-07-28T13:26:52.011Z",
"is_superuser": true,
"username": "taggit",
"first_name": "",
"last_name": "",
"email": "",
"is_staff": true,
"is_active": true,
"date_joined": "2024-07-27T17:02:40.676Z",
"groups": [],
"user_permissions": []
}
}
]
Loading

0 comments on commit 764664f

Please sign in to comment.