mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-10-30 23:47:30 +03:00 
			
		
		
		
	* 🔧 Add pre-commit config Similar to graphene and graphene-sqlalchemy * ⬆ Bump black * 👷 Lint on CI * ⬆ Bump flake8-black * 🔧 Keep excluding migrations * ⬆ Bump flake8 * 🔧 Remove black and flake8 from tox config * ⬆ Update pre-commit versions * Upgrade syntax to python 3.7+ * Format with pre-commit dedent docs/schema.py to allow formatting * Fix tests on python 3.7
		
			
				
	
	
		
			71 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Generated by Django 1.9 on 2015-12-04 18:20
 | |
| 
 | |
| import django.db.models.deletion
 | |
| from django.db import migrations, models
 | |
| 
 | |
| 
 | |
| class Migration(migrations.Migration):
 | |
| 
 | |
|     initial = True
 | |
| 
 | |
|     dependencies = [
 | |
|         ("ingredients", "0001_initial"),
 | |
|     ]
 | |
| 
 | |
|     operations = [
 | |
|         migrations.CreateModel(
 | |
|             name="Recipe",
 | |
|             fields=[
 | |
|                 (
 | |
|                     "id",
 | |
|                     models.AutoField(
 | |
|                         auto_created=True,
 | |
|                         primary_key=True,
 | |
|                         serialize=False,
 | |
|                         verbose_name="ID",
 | |
|                     ),
 | |
|                 ),
 | |
|                 ("title", models.CharField(max_length=100)),
 | |
|                 ("instructions", models.TextField()),
 | |
|             ],
 | |
|         ),
 | |
|         migrations.CreateModel(
 | |
|             name="RecipeIngredient",
 | |
|             fields=[
 | |
|                 (
 | |
|                     "id",
 | |
|                     models.AutoField(
 | |
|                         auto_created=True,
 | |
|                         primary_key=True,
 | |
|                         serialize=False,
 | |
|                         verbose_name="ID",
 | |
|                     ),
 | |
|                 ),
 | |
|                 ("amount", models.FloatField()),
 | |
|                 (
 | |
|                     "unit",
 | |
|                     models.CharField(
 | |
|                         choices=[("kg", "Kilograms"), ("l", "Litres"), ("", "Units")],
 | |
|                         max_length=20,
 | |
|                     ),
 | |
|                 ),
 | |
|                 (
 | |
|                     "ingredient",
 | |
|                     models.ForeignKey(
 | |
|                         on_delete=django.db.models.deletion.CASCADE,
 | |
|                         related_name="used_by",
 | |
|                         to="ingredients.Ingredient",
 | |
|                     ),
 | |
|                 ),
 | |
|                 (
 | |
|                     "recipes",
 | |
|                     models.ForeignKey(
 | |
|                         on_delete=django.db.models.deletion.CASCADE,
 | |
|                         related_name="amounts",
 | |
|                         to="recipes.Recipe",
 | |
|                     ),
 | |
|                 ),
 | |
|             ],
 | |
|         ),
 | |
|     ]
 |