Skip to content

Commit ab81deb

Browse files
committed
Adding temporary changes to Github
1 parent 0c96c84 commit ab81deb

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

server/djangoapp/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from django.contrib import admin
2-
from .models import CarMake, CarModel
2+
from .models import CarMake, CarModel
33

44
admin.site.register(CarMake)
5-
admin.site.register(CarModel)
5+
admin.site.register(CarModel)
66
# Register your models here.
77

88
# CarModelInline class

server/djangoapp/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Uncomment the following imports before adding the Model code
22

33
from django.db import models
4-
from django.utils.timezone import now
54
from django.core.validators import MaxValueValidator, MinValueValidator
65

76

@@ -33,4 +32,4 @@ class CarModel(models.Model):
3332
# Other fields as needed
3433

3534
def __str__(self):
36-
return self.name
35+
return self.name

server/djangoapp/populate.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
def initiate():
44
car_make_data = [
5-
{"name":"NISSAN", "description":"Great cars. Japanese technology"},
6-
{"name":"Mercedes", "description":"Great cars. German technology"},
7-
{"name":"Audi", "description":"Great cars. German technology"},
8-
{"name":"Kia", "description":"Great cars. Korean technology"},
9-
{"name":"Toyota", "description":"Great cars. Japanese technology"},
5+
{"name": "NISSAN", "description": "Great cars. Japanese technology"},
6+
{"name": "Mercedes", "description": "Great cars. German technology"},
7+
{"name": "Audi", "description": "Great cars. German technology"},
8+
{"name": "Kia", "description": "Great cars. Korean technology"},
9+
{"name": "Toyota", "description": "Great cars. Japanese technology"},
1010
]
1111

1212
car_make_instances = []
1313
for data in car_make_data:
14-
car_make_instances.append(CarMake.objects.create(name=data['name'], description=data['description']))
14+
car_make_instances.append(CarMake.objects.create(name=data['name'], description=data['description']))
1515

1616

1717
# Create CarModel instances with the corresponding CarMake instances

server/djangoapp/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.shortcuts import render
44
from django.http import HttpResponseRedirect, HttpResponse
55
from django.contrib.auth.models import User
6-
from django.shortcuts import get_object_or_404, render, redirect
6+
from django.shortcuts import get_object_or_404, redirect
77
from django.contrib.auth import logout
88
from django.contrib import messages
99
from datetime import datetime
@@ -18,7 +18,7 @@
1818
from .models import CarMake, CarModel
1919

2020

21-
#Get an instance of a logger
21+
#Get an instance of a logger
2222
logger = logging.getLogger(__name__)
2323

2424

0 commit comments

Comments
 (0)