Skip to content
Snippets Groups Projects
Select Git revision
  • bafd04dbcafd7412b1c380758b29b927ef94ffff
  • master default
  • add-challenge
  • add-chall
4 results

__init__.pyc

Blame
  • Forked from Hodor Security Project / Hodor Web Backend
    Source project has a limited visibility.
    0001_initial.py 1.50 KiB
    # Generated by Django 3.1.4 on 2020-12-27 12:45
    
    from django.db import migrations, models
    import django.db.models.deletion
    
    
    class Migration(migrations.Migration):
    
        initial = True
    
        dependencies = [
        ]
    
        operations = [
            migrations.CreateModel(
                name='Author',
                fields=[
                    ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                    ('author_name', models.CharField(max_length=100, unique=True)),
                ],
            ),
            migrations.CreateModel(
                name='Genre',
                fields=[
                    ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                    ('genre_name', models.CharField(max_length=100, unique=True)),
                ],
            ),
            migrations.CreateModel(
                name='Book',
                fields=[
                    ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                    ('book_title', models.CharField(max_length=100)),
                    ('description', models.TextField(blank=True, max_length=400, null=True)),
                    ('price', models.FloatField(blank=True, help_text='In rupees (₹)', null=True)),
                    ('author_fk', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='online_books.author')),
                    ('genres', models.ManyToManyField(to='online_books.Genre')),
                ],
            ),
        ]