adamspd / django-appointment

A Django app for managing appointment scheduling with ease and flexibility.
Apache License 2.0
87 stars 29 forks source link

Error installing in cookiecutter django project #215

Closed eecarres closed 3 days ago

eecarres commented 3 days ago

Describe the bug I have a problem when installing and running the app To Reproduce Steps to reproduce the behavior:

  1. Generate django cookiecutter app (blank one)
  2. Follow the steps in the guide: Update urls.py, include app in installed apps
  3. Run makemigrations appointment as the guide suggests (I did not include django Q)

Expected behavior To create the migrations successfully

Logs

    path('appointment/', include('appointment.urls')),
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/urls/conf.py", line 38, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/local/lib/python3.12/site-packages/appointment/urls.py", line 11, in <module>
    from appointment.views import (
  File "/usr/local/lib/python3.12/site-packages/appointment/views.py", line 24, in <module>
    from appointment.forms import AppointmentForm, AppointmentRequestForm, SlotForm, ClientDataForm
  File "/usr/local/lib/python3.12/site-packages/appointment/forms.py", line 42, in <module>
    class AppointmentForm(forms.ModelForm):
  File "/usr/local/lib/python3.12/site-packages/appointment/forms.py", line 43, in AppointmentForm
    phone = PhoneNumberField(widget=PhoneNumberPrefixWidget(initial='US'))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MultiWidget.__init__() got an unexpected keyword argument 'initial'

Additional context I run this in docker compose, although I don't think that might be relevant

Can you fix the bug?

eecarres commented 3 days ago

My bad, it seems I have a conflict with the requirements and I had django_phonenumber_field-8.0.0, which is not the version required by this repo. Apologies!!

adamspd commented 3 days ago

Hi @eecarres, yes, this is a problem I'm currently working on. I need to address the issue with this package breaking changes.

eecarres commented 3 days ago

Thanks for the answer and for your time. Amazing work!!

El jue, 4 jul 2024, 13:08, Adams Pierre David @.***> escribió:

Hi @eecarres https://github.com/eecarres, yes, this is a problem I'm currently working on. I need to address the issue with this package breaking changes.

— Reply to this email directly, view it on GitHub https://github.com/adamspd/django-appointment/issues/215#issuecomment-2208706234, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSFTSTISNLCACPJMNKIUYDZKUUKVAVCNFSM6AAAAABKLDGJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBYG4YDMMRTGQ . You are receiving this because you were mentioned.Message ID: @.***>