diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index ae6ee69..ccdc8c4 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index 62e5201..d104fa0 100644 --- a/config/settings.py +++ b/config/settings.py @@ -211,5 +211,6 @@ WHATSAPP_ENABLED = os.getenv("WHATSAPP_ENABLED", "true").lower() == "true" # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +LOGIN_URL = 'login' LOGIN_REDIRECT_URL = 'dashboard' LOGOUT_REDIRECT_URL = 'index' \ No newline at end of file diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc index cbc72b4..7190282 100644 Binary files a/core/__pycache__/forms.cpython-311.pyc and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index fdc0ec8..d5259c3 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 7bda0a8..92cbcc8 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 25218ec..3d1e861 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/forms.py b/core/forms.py index 7deba2d..09ac040 100644 --- a/core/forms.py +++ b/core/forms.py @@ -15,6 +15,7 @@ class UserRegistrationForm(forms.ModelForm): password_confirm = forms.CharField(widget=forms.PasswordInput, label=_("Confirm Password")) role = forms.ChoiceField(choices=Profile.ROLE_CHOICES, label=_("Register as")) phone_number = forms.CharField(max_length=20, label=_("Phone Number")) + verification_method = forms.ChoiceField(choices=[('email', _('Email')), ('whatsapp', _('WhatsApp'))], label=_("Verify via"), widget=forms.RadioSelect, initial='email') country = forms.ModelChoiceField(queryset=Country.objects.all(), required=False, label=_("Country")) governate = forms.ModelChoiceField(queryset=Governate.objects.none(), required=False, label=_("Governate")) diff --git a/core/migrations/0014_alter_otpverification_purpose.py b/core/migrations/0014_alter_otpverification_purpose.py new file mode 100644 index 0000000..56b9b56 --- /dev/null +++ b/core/migrations/0014_alter_otpverification_purpose.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.7 on 2026-01-25 15:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0013_platformprofile_enable_payment'), + ] + + operations = [ + migrations.AlterField( + model_name='otpverification', + name='purpose', + field=models.CharField(choices=[('profile_update', 'Profile Update'), ('password_reset', 'Password Reset'), ('registration', 'Registration')], default='profile_update', max_length=20), + ), + ] diff --git a/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc b/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc new file mode 100644 index 0000000..e25dc08 Binary files /dev/null and b/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index dad3a39..35f9189 100644 --- a/core/models.py +++ b/core/models.py @@ -198,6 +198,7 @@ class OTPVerification(models.Model): PURPOSE_CHOICES = ( ('profile_update', _('Profile Update')), ('password_reset', _('Password Reset')), + ('registration', _('Registration')), ) user = models.ForeignKey(User, on_delete=models.CASCADE) code = models.CharField(max_length=6) diff --git a/core/templates/core/edit_profile.html b/core/templates/core/edit_profile.html index 49f4b42..0037256 100644 --- a/core/templates/core/edit_profile.html +++ b/core/templates/core/edit_profile.html @@ -8,6 +8,13 @@