mirror of
https://github.com/Hopiu/django.git
synced 2026-03-17 14:30:24 +00:00
11 lines
304 B
Python
11 lines
304 B
Python
from django.db import models
|
|
|
|
|
|
class Site(models.Model):
|
|
name = models.CharField(max_length=100)
|
|
|
|
|
|
class Article(models.Model):
|
|
sites = models.ManyToManyField(Site)
|
|
headline = models.CharField(max_length=100)
|
|
publications = models.ManyToManyField("model_package.Publication", blank=True)
|