Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
# 1. Database – 100 points class Director(models.Model): full_name = models.CharField(max_length=120, validators=[MinLengthValidatior(2)]) birth_date = models.DateField(default='1900-01-01') nationality = models.CharField(max_length=50, default='Unknown') years_of_experience = models.SmallIntegerField(default=0, validators=[MinValueValidator(0)]) class Actor(models.Model): full_name = models.CharField(max_length=120, validators=[MinLengthValidatior(2)]) birth_date = models.DateField(default='1900-01-01') nationality = models.CharField(max_length=50, default='Unknown') is_awarded = models.BooleanField(default=False) last_updated = models.DateTimeField(auto_now=True) class Movie(models.Model): GENRE_CHOICES = ( ('Action', 'Action'), ('Comedy', 'Comedy'), ('Drama', 'Drama'), ('Other', 'Other') ) title = models.CharField(max_length=150, validatiors=[MinLengthValidatior(5)]) release_date = models.DateField() storyline = models.TextField(null=True, blank=True) genre = models.CharField(max_length=6, default='Other') rating = models.DecimalField(max_digits=3, decimal_places=1, validators=[validators.MinValueValidator(0), validators.MaxValueValidator(10)], default=0) is_classic = models.BooleanField(default=False) is_awarded = models.BooleanField(default=False) last_updated = models.DateTimeField(auto_now=True) director = models.ForeignKey("Director", on_delete=models.CASCADE) starring_actor = models.ForeignKey("Actor", null=True, on_delete=models.SET_NULL) actors = models.ManyToManyField("Actor")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)