Add Album model
This commit is contained in:
parent
80cf963b7f
commit
1a65aec740
3 changed files with 51 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
# Generated by Django 5.1.4 on 2024-12-29 13:38
|
||||
# Generated by Django 5.1.4 on 2024-12-29 21:23
|
||||
|
||||
import datetime
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
@ -34,4 +35,18 @@ class Migration(migrations.Migration):
|
|||
'unique_together': {('place', 'city')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Album',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=150, unique=True, verbose_name='Album')),
|
||||
('slug', models.SlugField(max_length=150, unique=True, verbose_name='Slug')),
|
||||
('album_date', models.DateField(default=datetime.datetime.now, verbose_name='Album Date')),
|
||||
('is_public', models.BooleanField(default=False, verbose_name='Published')),
|
||||
('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='albums', to='gallery.location', verbose_name='Location')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Albums',
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue