diff --git a/.DS_Store b/.DS_Store index cabd21d1..02ea9385 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/inventory/.DS_Store b/inventory/.DS_Store index a05c7334..c58698c1 100644 Binary files a/inventory/.DS_Store and b/inventory/.DS_Store differ diff --git a/inventory/__pycache__/services.cpython-311.pyc b/inventory/__pycache__/services.cpython-311.pyc index 0bc9414b..531ca47d 100644 Binary files a/inventory/__pycache__/services.cpython-311.pyc and b/inventory/__pycache__/services.cpython-311.pyc differ diff --git a/inventory/__pycache__/views.cpython-311.pyc b/inventory/__pycache__/views.cpython-311.pyc index 3f22b4bc..619f2bff 100644 Binary files a/inventory/__pycache__/views.cpython-311.pyc and b/inventory/__pycache__/views.cpython-311.pyc differ diff --git a/inventory/haikalna.py b/inventory/haikalna.py index b358d6df..e2475e5f 100644 --- a/inventory/haikalna.py +++ b/inventory/haikalna.py @@ -1614,14 +1614,14 @@ def decode_vds(manufacturer, vds): }, 'Dongfeng': { - 1: { # First character + 1: { 'A': 'A-Series', - 'B': 'SHINE', # SHINE model - 'C': 'C-Series', # General C-Series - 'D': 'MAGE', # MAGE model - 'E': ['CAPTAIN E', 'E32'], # CAPTAIN and E-Series models - 'F': 'CAPTAIN C', # CAPTAIN C model - 'G': 'S50', # S50 model + 'B': 'SHINE', + 'C': 'C-Series', + 'D': 'MAGE', + 'E': ['CAPTAIN E', 'E32'], + 'F': 'CAPTAIN C', + 'G': 'S50', 'H': 'Dongfeng Fengshen AX3', 'J': 'Dongfeng Joyear SUV', 'K': 'Dongfeng Rich 6', @@ -1629,7 +1629,7 @@ def decode_vds(manufacturer, vds): 'M': 'Dongfeng Glory 580', }, - 2: { # Second character (for C-Series) + 2: { '3': 'C35', # Specific models in C-Series '1': 'C31', '2': 'C32', diff --git a/inventory/views.py b/inventory/views.py index 434c0754..36a872ec 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -209,26 +209,23 @@ def dealer_signup(request, *args, **kwargs): ) -# class Login(allauth_views.LoginView): -# template_name = "account/login.html" -# redirect_authenticated_user = True -class OTPView(View, LoginRequiredMixin): - template_name = "account/otp_verification.html" - - def get(self, request, *args, **kwargs): - # device = default_device(request.user) - # device.generate_challenge() - return render(request, self.template_name) - - def post(self, request, *args, **kwargs): - otp_code = request.POST.get("otp_code") - - if self.verify_otp(otp_code, request.user): - messages.success(request, _("OTP verified successfully!")) - return redirect("home") - - messages.error(request, _("Invalid OTP. Please try again.")) - return render(request, self.template_name) +# class OTPView(View, LoginRequiredMixin): +# template_name = "account/otp_verification.html" +# +# def get(self, request, *args, **kwargs): +# # device = default_device(request.user) +# # device.generate_challenge() +# return render(request, self.template_name) +# +# def post(self, request, *args, **kwargs): +# otp_code = request.POST.get("otp_code") +# +# if self.verify_otp(otp_code, request.user): +# messages.success(request, _("OTP verified successfully!")) +# return redirect("home") +# +# 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) @@ -237,8 +234,6 @@ class OTPView(View, LoginRequiredMixin): # return False - - class HomeView(TemplateView): template_name = "index.html" diff --git a/templates/inventory/car_form.html b/templates/inventory/car_form.html index 1780c437..300f2433 100644 --- a/templates/inventory/car_form.html +++ b/templates/inventory/car_form.html @@ -24,22 +24,22 @@