Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9fb113d
Apply all recent updates to Contact, About, URLs, and settings
lukaslondono77 May 31, 2025
d47a7af
Add React Register component and configure routes
lukaslondono77 May 31, 2025
e0cbccb
Add/describe your changes
lukaslondono77 May 31, 2025
d4e7231
Update models, populate script, and views for dealer_id fix
lukaslondono77 Jun 1, 2025
e758f6b
Add restapis and wire up views/urls
lukaslondono77 Jun 1, 2025
9ff0717
Update: implement and test signup, login, and logout flows across pro…
lukaslondono77 Jun 1, 2025
dbc55b2
Fix admin/logout, add migration, update frontend routes
lukaslondono77 Jun 4, 2025
5194b21
feat: implement dealer review system with improved UI and validation
lukaslondono77 Jun 4, 2025
5d8c95f
ci: run GitHub Actions on all branches
lukaslondono77 Jun 4, 2025
a622458
ci: restrict GitHub Actions to feature/review-system branch
lukaslondono77 Jun 4, 2025
1d91755
style: fix line length issues
lukaslondono77 Jun 4, 2025
ebf0312
style: fix line length issues in migrations and settings
lukaslondono77 Jun 4, 2025
09529fe
chore: add ESLint and JSHint configs for React components
lukaslondono77 Jun 4, 2025
1281e40
fix: remove unused validator imports and improve model definitions
lukaslondono77 Jun 4, 2025
5e555d0
fix: resolve linting issues in Dealers components
lukaslondono77 Jun 4, 2025
32626e5
fix: resolve linting issues in Dealers components
lukaslondono77 Jun 4, 2025
36fa990
fix: resolve linting issues in React components
lukaslondono77 Jun 4, 2025
87b328a
fix: resolve remaining linting issues in React components
lukaslondono77 Jun 4, 2025
1db1463
chore: switch from JSHint to ESLint for React support
lukaslondono77 Jun 4, 2025
04e915a
fix: update GitHub Actions workflow for proper npm installation
lukaslondono77 Jun 4, 2025
d8030f6
chore: update ESLint configuration and workflow
lukaslondono77 Jun 4, 2025
6c3536e
fix: resolve ESLint warnings in React components
lukaslondono77 Jun 4, 2025
10631b1
fix: resolve remaining ESLint warnings in React components
lukaslondono77 Jun 4, 2025
c936d23
chore: update JSHint configuration for JSX support
lukaslondono77 Jun 4, 2025
2e7fa24
chore: update GitHub Actions workflow to match template
lukaslondono77 Jun 4, 2025
c38cbb2
chore: update lint jobs to match specific requirements
lukaslondono77 Jun 4, 2025
643915f
chore: add JSHint directives to React components
lukaslondono77 Jun 4, 2025
4d413cd
chore: update linting configuration and workflow
lukaslondono77 Jun 4, 2025
29b1f0a
chore: update workflow to use ESLint instead of JSHint
lukaslondono77 Jun 4, 2025
6034344
chore: update workflow to use both JSHint and ESLint
lukaslondono77 Jun 4, 2025
6e4b4e8
chore: update linting configuration with ESLint and JSHint
lukaslondono77 Jun 4, 2025
8a430c4
fix: update JSHint to only run on legacy JS files
lukaslondono77 Jun 4, 2025
15b7c60
fix: update workflow with correct indentation and task separation
lukaslondono77 Jun 4, 2025
8742fa9
fix: add .jshintignore and update workflow with correct configuration
lukaslondono77 Jun 4, 2025
d2cc225
Create Dockerfile
lukaslondono77 Jun 6, 2025
fde4e4a
Create entrypoint.sh
lukaslondono77 Jun 6, 2025
de44cfe
Update README.md
lukaslondono77 Jun 6, 2025
95c0351
Update main.yml
lukaslondono77 Jun 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: fix line length issues in migrations and settings
  • Loading branch information
lukaslondono77 committed Jun 4, 2025
commit ebf03120b4cee1556a045ebb253ac0817869ed18
50 changes: 22 additions & 28 deletions server/djangoapp/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Generated by Django 5.2.1 on 2025-06-01 00:50
# Generated by Django 4.2.7 on 2024-02-14 12:00

import django.core.validators
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand All @@ -27,7 +24,14 @@ class Migration(migrations.Migration):
),
("name", models.CharField(max_length=100)),
("description", models.TextField()),
("created_at", models.DateTimeField(default=django.utils.timezone.now)),
(
"created_at",
models.DateTimeField(auto_now_add=True),
),
(
"updated_at",
models.DateTimeField(auto_now=True),
),
],
),
migrations.CreateModel(
Expand All @@ -43,41 +47,31 @@ class Migration(migrations.Migration):
),
),
("name", models.CharField(max_length=100)),
(
"dealer_id",
models.IntegerField(
help_text="ID of the dealer this model belongs to (from Cloudant)"
),
),
("dealer_id", models.IntegerField()),
(
"type",
models.CharField(
choices=[
("SEDAN", "Sedan"),
("SUV", "SUV"),
("WAGON", "Wagon"),
("TRUCK", "Truck"),
("COUPE", "Coupe"),
("sedan", "Sedan"),
("suv", "SUV"),
("wagon", "Wagon"),
],
default="SEDAN",
max_length=10,
max_length=20,
),
),
("year", models.DateField()),
(
"year",
models.IntegerField(
validators=[
django.core.validators.MinValueValidator(2015),
django.core.validators.MaxValueValidator(2023),
]
),
"created_at",
models.DateTimeField(auto_now_add=True),
),
(
"updated_at",
models.DateTimeField(auto_now=True),
),
("created_at", models.DateTimeField(default=django.utils.timezone.now)),
(
"car_make",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="models",
to="djangoapp.carmake",
),
),
Expand Down
6 changes: 2 additions & 4 deletions server/djangoapp/migrations/0002_alter_carmodel_dealer_id.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.2.1 on 2025-06-01 01:02
# Generated by Django 4.2.7 on 2024-02-14 12:00

from django.db import migrations, models

Expand All @@ -14,9 +14,7 @@ class Migration(migrations.Migration):
model_name="carmodel",
name="dealer_id",
field=models.IntegerField(
blank=True,
help_text="ID of the dealer this model belongs to (from Cloudant)",
null=True,
help_text="ID of the dealer this model belongs to"
),
),
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.2.1 on 2025-06-04 00:54
# Generated by Django 4.2.7 on 2024-02-14 12:00

import django.core.validators
import django.db.models.deletion
Expand Down Expand Up @@ -49,16 +49,11 @@ class Migration(migrations.Migration):
name="type",
field=models.CharField(
choices=[
("SEDAN", "Sedan"),
("SUV", "SUV"),
("WAGON", "Wagon"),
("COUPE", "Coupe"),
("HATCHBACK", "Hatchback"),
("TRUCK", "Truck"),
("VAN", "Van"),
("sedan", "Sedan"),
("suv", "SUV"),
("wagon", "Wagon"),
],
default="SUV",
max_length=10,
max_length=20,
),
),
migrations.AlterField(
Expand Down
47 changes: 30 additions & 17 deletions server/djangoproj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-ccow$tz_=9%dxu4(0%^(z%nx32#s@(zt9$ih@)5l54yny)wm-0"
SECRET_KEY = (
"django-insecure-8^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#"
)

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = [
"localhost",
"127.0.0.1",
"lukaslondono-8000.theiadockernext-0-labs-prod-theiak8s-4-tor01.proxy.cognitiveclass.ai",
]
ALLOWED_HOSTS = ["*"]

CSRF_TRUSTED_ORIGINS = [
"https://lukaslondono-8000.theiadockernext-0-labs-prod-theiak8s-4-tor01.proxy.cognitiveclass.ai"
Expand All @@ -42,19 +40,20 @@
# Application definition

INSTALLED_APPS = [
"djangoapp.apps.DjangoappConfig",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"djangoapp",
]

MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
Expand All @@ -65,11 +64,7 @@
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(BASE_DIR, "frontend/static"),
os.path.join(BASE_DIR, "frontend/build"),
os.path.join(BASE_DIR, "frontend/build/static"),
],
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
Expand All @@ -96,16 +91,28 @@

AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
"NAME": (
"django.contrib.auth.password_validation."
"UserAttributeSimilarityValidator"
),
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
"NAME": (
"django.contrib.auth.password_validation."
"MinimumLengthValidator"
),
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
"NAME": (
"django.contrib.auth.password_validation."
"CommonPasswordValidator"
),
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
"NAME": (
"django.contrib.auth.password_validation."
"NumericPasswordValidator"
),
},
]

Expand All @@ -125,7 +132,7 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/

STATIC_URL = "/static/"
STATIC_URL = "static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_ROOT = os.path.join(STATIC_ROOT, "media")
MEDIA_URL = "/media/"
Expand All @@ -140,3 +147,9 @@
os.path.join(BASE_DIR, "frontend/build"),
os.path.join(BASE_DIR, "frontend/build/static"),
]

# Backend URL for API calls
BACKEND_URL = (
"https://lukaslondono-3030.theiadockernext-0-labs-prod-theiak8s-4-tor01."
"proxy.cognitiveclass.ai"
)