diff --git a/.idea/car_inventory.iml b/.idea/car_inventory.iml index f2963bf3..d635af89 100644 --- a/.idea/car_inventory.iml +++ b/.idea/car_inventory.iml @@ -27,6 +27,7 @@ + diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml index 4859cf50..a09fb84f 100644 --- a/.idea/jsLibraryMappings.xml +++ b/.idea/jsLibraryMappings.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/car_inventory/__pycache__/settings.cpython-311.pyc b/car_inventory/__pycache__/settings.cpython-311.pyc index 03d8f3a1..88b24ad3 100644 Binary files a/car_inventory/__pycache__/settings.cpython-311.pyc and b/car_inventory/__pycache__/settings.cpython-311.pyc differ diff --git a/inventory/__pycache__/views.cpython-311.pyc b/inventory/__pycache__/views.cpython-311.pyc index ba7b9058..845275c1 100644 Binary files a/inventory/__pycache__/views.cpython-311.pyc and b/inventory/__pycache__/views.cpython-311.pyc differ diff --git a/inventory/views.py b/inventory/views.py index 03fdcb92..4ce3cca4 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -151,7 +151,6 @@ def switch_language(request): return redirect("/") - def dealer_signup(request, *args, **kwargs): if request.method == "POST": data = json.loads(request.body) @@ -231,11 +230,11 @@ class OTPView(View, LoginRequiredMixin): messages.error(request, _("Invalid OTP. Please try again.")) return render(request, self.template_name) - def verify_otp(self, otp_code, user): - device = default_device(user) - if device and device.verify_token(otp_code): - return True - return False + # def verify_otp(self, otp_code, user): + # device = default_device(user) + # if device and device.verify_token(otp_code): + # return True + # return False @@ -251,6 +250,7 @@ class HomeView(TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) dealer = get_user_type(self.request) + total_cars = models.Car.objects.filter(dealer=dealer).count() total_reservations = models.CarReservation.objects.filter( reserved_until__gte=timezone.now() diff --git a/populate.py b/populate.py new file mode 100644 index 00000000..9d9b09af --- /dev/null +++ b/populate.py @@ -0,0 +1,5 @@ +from datetime import datetime +from zoneinfo import ZoneInfo + +START_DTTM = datetime(year=2022, month=10, day=1, tzinfo=ZoneInfo('Asia/Riyadh')) + diff --git a/templates/account/signup-wizard.html b/templates/account/signup-wizard.html index 43b73137..c31887d3 100644 --- a/templates/account/signup-wizard.html +++ b/templates/account/signup-wizard.html @@ -79,25 +79,13 @@ + + @@ -47,6 +47,8 @@ {% endif %} + + @@ -57,13 +59,43 @@ {% endblock %} + {% include 'header.html' %} - {% block period_navigation %}{% endblock period_navigation %} + {% block period_navigation %} + + {% endblock period_navigation %} {% block content %} {% endblock content%} @@ -97,42 +129,15 @@ - + - -