This commit is contained in:
Marwan Alwali 2025-05-31 11:56:00 +03:00
parent 56cfbad80e
commit 638d3854af
7 changed files with 35 additions and 11 deletions

View File

@ -16,7 +16,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="Python 3.11 (car_inventory)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jquery-3.5.1" level="application" />
<orderEntry type="library" name="sweetalert2" level="application" />

View File

@ -4,9 +4,9 @@ Services module
import requests
import json
from requests import Session
from vin import VIN
from pyvin import VIN
from django.conf import settings
from .models import CarMake
@ -111,9 +111,9 @@ def decode_vin(vin):
data = {}
if v:
data = {
"maker": v.make,
"model": v.model,
"modelYear": v.model_year,
"maker": v.Make,
"model": v.Model,
"modelYear": v.ModelYear,
}
return data if all([x for x in data.values()]) else None
@ -158,3 +158,6 @@ def elm(vin):
}
print([x for x in data.values()])
return data if all([x for x in data.values()]) else None

Binary file not shown.

View File

@ -5755,7 +5755,7 @@ msgstr "الإعدادات"
#: templates/header.html:444
msgid "Admin Managemnet"
msgstr "xxxxxxxxxxxxxxx"
msgstr "إدارة المشرفين"
#: templates/inventory/add_colors.html:5
msgid "Add Colors"

21
t1.py Normal file
View File

@ -0,0 +1,21 @@
import requests
def get_models_for_make():
make = "honda"
url = f"https://vpic.nhtsa.dot.gov/api/vehicles/GetModelsForMake/{make}/?format=json"
resp = requests.get(url)
if resp.status_code == 200:
results = resp.json()
return results["Results"]
else:
print(f"Error: {resp.status_code}")
return {"Error": f"Request failed with status code {resp.status_code}"}
models = get_models_for_make()
for model in models:
print(model["Model_Name"])

View File

@ -2,14 +2,14 @@
{% load i18n %}
{%block title%} {%trans 'Admin Management' %} {%endblock%}
{% block content %}
<h1 class="mt-4"><i class="fas fa-tools me-2"></i>Admin Management</h1>
<h1 class="mt-4"><i class="fas fa-tools me-2"> </i>{{ _("Admin Management")}}</h1>
<div class="row row-cols-1 row-cols-md-4 g-4 mt-10">
<div class="col">
<a href="{% url 'user_management' %}">
<div class="card h-100">
<div class="card-header text-center">
<h5 class="card-title">User Management</h5>
<span style="font-size: 2rem; font-weight: 500;" class="me-2"><i class="fas fa-user"></i></span>
<h5 class="card-title">{{ _("User Management")}}</h5>
<span class="me-2"><i class="fas fa-user fa-2x"></i></span>
</div>
</div>
</a>

View File

@ -8,7 +8,7 @@
{% block content %}
<section class="pt-5 pb-9">
<div class="row">
<h2 class="mb-4"><i class="fa-solid fa-people-roof me-1"></i>{% trans 'User Management' %}</h2>
<h2 class="mb-4"><i class="fa-solid fa-people-roof me-1"></i> {% trans 'User Management' %}</h2>
<div class="row g-3 justify-content-between mb-4">
<div class="col-12">
<h3 class="mb-3">{% trans 'Customers' %}</h3>