Changing gitignore and __str__ for Driver model

This commit is contained in:
bglacial 2019-04-21 01:04:24 +02:00
parent c323e0d196
commit 709d2c8403
4 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ music/migrations/__pycache__/
api/__pycache__/
music/tests/__pycache__/
music/views/__pycache__/
db.sqlite3

Binary file not shown.

View File

@ -25,7 +25,7 @@ class Driver(models.Model):
ordering = ['order']
def __str__(self):
return '%d: %s' % (self.first_name, self.last_name)
return self.kart.__str__() + " : " + self.first_name + " " + self.last_name
class Params(models.Model):

View File

@ -12,6 +12,7 @@ urlpatterns = [
# path('rules/', ListCreateRulesView.as_view(), name="rules-list-create"),
path('params/<int:pk>/', ParamsDetailView.as_view(), name="rules-detail"),
# path('relays/', ListCreateRelaysView.as_view(), name="relays-list-create"),
# path('relaysbykart/<int:pk>/', RelaysDetailView.as_view(), name="relays-detail"),
# path('relays/<int:pk>/', RelaysDetailView.as_view(), name="relays-detail"),
# path('races/', ListCreateRacesView.as_view(), name="races-list-create"),
# path('races/<int:pk>/', RacesDetailView.as_view(), name="races-detail"),