rocket-django icon indicating copy to clipboard operation
rocket-django copied to clipboard

Django 5 Tests - Community Effort

Open app-generator opened this issue 1 year ago • 2 comments

To be updated.

app-generator avatar Dec 16 '23 06:12 app-generator

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

Alphagest avatar Dec 17 '23 19:12 Alphagest

Ty @Alphagest

All the above is noted.

app-generator avatar Jan 03 '24 16:01 app-generator

Hello!

Sorry for the delay. The new AppSeed Service now manages the project and related issues:

https://app-generator.dev/ - Open-Source Platform.

Ty!

app-generator avatar Dec 18 '24 19:12 app-generator