app-generator / rocket-django

Rocket Django - Free Starter styled with Tailwind/Flowbite | AppSeed

Home Page:https://appseed.us/product/rocket/django/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django 5 Tests - Community Effort

app-generator opened this issue Β· comments

To be updated.

For context, I removed all references to specific versions in the requirements.txt file.
work with latest django (5) and all latests modules.
python3.12.
I also used pipenv to create and activate the virtual environment

the list of problems during installation:

1- Commande : python manage.py makemigrations
πŸ‘ŽError :

core\settings.py", line 16, in <module>
       from distutils.util import strtobool
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ModuleNotFoundError: No module named 'distutils'

πŸ‘solution: use django-environ instead of dotenv

2- : Commande : python manage.py makemigrations
πŸ‘Ž Error :

\apps\api\urls.py:8: SyntaxWarning: invalid escape sequence '\d'
  re_path("sales/((?P<pk>\d+)/)?", csrf_exempt(SalesView.as_view())),

πŸ‘ Sollution : re_path(r"sales/((?P<pk>\d+)/)?", csrf_exempt(SalesView.as_view())),

3-: Commande : Navigate to users/user-list
πŸ‘Ž Error :

UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'django.contrib.auth.models.User'> QuerySet.
  paginator = Paginator(user_list, 5)

πŸ‘ **Sollution :add ** .order_by('username') to users/views.py ligne 100

πŸ’― with these modifications, everything seems to work correctly

Ty @Alphagest

All the above is noted.