This commit refactors the models in the 'models' app, specifically 'clients' and 'services' modules. It includes the PhoneNumberField in the Client model and adds a new Credential model to the services module. The Service model has been modified to include new fields and relationships.

This commit is contained in:
sankalp committed 2025-12-09 13:35:09 +05:45
1 parent 27ca456212
commit 8b50ff5412
24 files changed
+1483 -49

No files matched your search

+2 -1
View File
@@ -22,6 +22,7 @@ THIRD_PARTY_APPS = [
"django_components",
"django_htmx",
"nepali_datetime_field",
"phonenumber_field",
]
USER_DEFINED_APPS = [
@@ -94,7 +95,7 @@ AUTH_PASSWORD_VALIDATORS = [
# https://docs.djangoproject.com/en/5.2/topics/i18n/
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
TIME_ZONE = "Asia/Kathmandu"
USE_I18N = True
USE_TZ = True
+2 -2
View File
@@ -1,6 +1,6 @@
"""generated with djinit"""
from .base import *
from .base import * # noqa: F403, F405
SECRET_KEY = "RKOHQN9iLI(J50m4KW=ge(t#69PI&BTI!yp*iq&0wtcW350dD="
@@ -15,7 +15,7 @@ ALLOWED_HOSTS = ["*"]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"NAME": BASE_DIR / "db.sqlite3", # noqa: F405
"OPTIONS": {
"transaction_mode": "IMMEDIATE",
"timeout": 5, # seconds
+11 -11
View File
@@ -1,14 +1,14 @@
"""generated with djinit"""
from .base import *
from .base import * # noqa: F403, F405
DEBUG = False
SECRET_KEY = env("SECRET_KEY")
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[])
SECRET_KEY = env("SECRET_KEY") # noqa: F405
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) # noqa: F405
# Database
# Using dj_database_url (recommended for production)
DATABASES = {"default": env.db("DATABASE_URL")}
DATABASES = {"default": env.db("DATABASE_URL")} # noqa: F405
# CORS settings for production
# Filter out empty strings from FRONTEND_URL
@@ -18,13 +18,13 @@ CORS_ALLOW_PRIVATE_NETWORK = False
# Email settings
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = env("EMAIL_HOST")
EMAIL_PORT = env.int("EMAIL_PORT", default=587)
EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS", default=True)
EMAIL_HOST_USER = env("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD")
DEFAULT_FROM_EMAIL = env("EMAIL_HOST_USER")
SERVER_EMAIL = env("EMAIL_HOST_USER")
EMAIL_HOST = env("EMAIL_HOST") # noqa: F405
EMAIL_PORT = env.int("EMAIL_PORT", default=587) # noqa: F405
EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS", default=True) # noqa: F405
EMAIL_HOST_USER = env("EMAIL_HOST_USER") # noqa: F405
EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") # noqa: F405
DEFAULT_FROM_EMAIL = env("EMAIL_HOST_USER") # noqa: F405
SERVER_EMAIL = env("EMAIL_HOST_USER") # noqa: F405
# Security settings for production
SECURE_SSL_REDIRECT = True