séparation des application pols et vehicles
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from polls.models import Question, Choice, Vehicles
|
||||
from polls.models import Question, Choice
|
||||
from vehicles.models import *
|
||||
|
||||
|
||||
# Register your models here.
|
||||
|
16
polls/migrations/0003_delete_vehicles.py
Normal file
16
polls/migrations/0003_delete_vehicles.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 4.0 on 2021-12-18 17:54
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('polls', '0002_rename_questionid_choice_question'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='Vehicles',
|
||||
),
|
||||
]
|
@@ -1,31 +1,10 @@
|
||||
import datetime
|
||||
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
# Create your models here.
|
||||
class Vehicles(models.Model):
|
||||
sName = models.CharField (max_length=250)
|
||||
bEnabled = models.BooleanField( default=0 )
|
||||
|
||||
class Vhc_problems(models.Model):
|
||||
Vehicle = models.ForeignKey( Vehicles, on_delete=models.CASCADE)
|
||||
sTitle = models.CharField( max_length=250)
|
||||
sDesc = models.TextField()
|
||||
bEnabled = models.BooleanField( default=1)
|
||||
dtStart = models.DateTimeField()
|
||||
dtEnd = models.DateTimeField()
|
||||
sAuthor = models.CharField( max_length=120)
|
||||
Author = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.DO_NOTHING )
|
||||
dtUpdated = models.DateTimeField('date updated')
|
||||
dtCreated = models.DateTimeField('date published')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Question(models.Model):
|
||||
question_txt = models.CharField( max_length=250)
|
||||
pub_date = models.DateTimeField('date published')
|
||||
|
Reference in New Issue
Block a user