mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
basics of invite link creation
This commit is contained in:
29
cookbook/migrations/0077_invitelink.py
Normal file
29
cookbook/migrations/0077_invitelink.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 3.0.7 on 2020-09-01 11:31
|
||||
|
||||
import datetime
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('cookbook', '0076_shoppinglist_entries'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='InviteLink',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4)),
|
||||
('username', models.CharField(blank=True, max_length=64)),
|
||||
('valid_until', models.DateField(default=datetime.date(2020, 9, 15))),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user