mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-10-31 07:57:31 +03:00 
			
		
		
		
	Adjustments to make it work with Django 2.0.1
I tried the tutorial but ran into these two problems in Django 2.0.1.
This commit is contained in:
		
							parent
							
								
									b54e02c9ba
								
							
						
					
					
						commit
						ea4ddc7f79
					
				|  | @ -68,7 +68,8 @@ Let's get started with these models: | ||||||
|     class Ingredient(models.Model): |     class Ingredient(models.Model): | ||||||
|         name = models.CharField(max_length=100) |         name = models.CharField(max_length=100) | ||||||
|         notes = models.TextField() |         notes = models.TextField() | ||||||
|         category = models.ForeignKey(Category, related_name='ingredients') |         category = models.ForeignKey(Category, related_name='ingredients', | ||||||
|  |            on_delete=models.CASCADE) | ||||||
| 
 | 
 | ||||||
|         def __str__(self): |         def __str__(self): | ||||||
|             return self.name |             return self.name | ||||||
|  | @ -80,7 +81,7 @@ Add ingredients as INSTALLED_APPS: | ||||||
|     INSTALLED_APPS = [ |     INSTALLED_APPS = [ | ||||||
|         ... |         ... | ||||||
|         # Install the ingredients app |         # Install the ingredients app | ||||||
|         'ingredients', |         'cookbook.ingredients', | ||||||
|     ] |     ] | ||||||
| 
 | 
 | ||||||
| Don't forget to create & run migrations: | Don't forget to create & run migrations: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user