0001_initial.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Generated by Django 2.1.3 on 2018-11-20 13:49
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import django.db.models.manager
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='Bookmark',
  14. fields=[
  15. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  16. ('url', models.URLField()),
  17. ('title', models.CharField(max_length=255, verbose_name='title')),
  18. ('description', models.TextField(blank=True, verbose_name='description')),
  19. ('is_public', models.BooleanField(default=True, verbose_name='public')),
  20. ('date_created', models.DateTimeField(verbose_name='date created')),
  21. ('date_updated', models.DateTimeField(verbose_name='date updated')),
  22. ('owner', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='bookmarks', to=settings.AUTH_USER_MODEL, verbose_name='owner')),
  23. ],
  24. options={
  25. 'verbose_name': 'bookmark',
  26. 'verbose_name_plural': 'bookmarkS',
  27. 'ordering': ['-date_created'],
  28. },
  29. managers=[
  30. ('object', django.db.models.manager.Manager()),
  31. ],
  32. ),
  33. migrations.CreateModel(
  34. name='Tag',
  35. fields=[
  36. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  37. ('name', models.CharField(max_length=50, unique=True)),
  38. ],
  39. options={
  40. 'verbose_name': 'tag',
  41. 'verbose_name_plural': 'tagS',
  42. 'ordering': ['name'],
  43. },
  44. ),
  45. migrations.AddField(
  46. model_name='bookmark',
  47. name='tags',
  48. field=models.ManyToManyField(blank=True, to='marcador.Tag'),
  49. ),
  50. ]