mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 09:57:53 +03:00 
			
		
		
		
	Merge pull request #377 from faassen/patch-1
Adjustments to make it work with Django 2.0.1
This commit is contained in:
		
						commit
						e05f069b3b
					
				| 
						 | 
				
			
			@ -68,7 +68,8 @@ Let's get started with these models:
 | 
			
		|||
    class Ingredient(models.Model):
 | 
			
		||||
        name = models.CharField(max_length=100)
 | 
			
		||||
        notes = models.TextField()
 | 
			
		||||
        category = models.ForeignKey(Category, related_name='ingredients')
 | 
			
		||||
        category = models.ForeignKey(Category, related_name='ingredients',
 | 
			
		||||
           on_delete=models.CASCADE)
 | 
			
		||||
 | 
			
		||||
        def __str__(self):
 | 
			
		||||
            return self.name
 | 
			
		||||
| 
						 | 
				
			
			@ -80,7 +81,7 @@ Add ingredients as INSTALLED_APPS:
 | 
			
		|||
    INSTALLED_APPS = [
 | 
			
		||||
        ...
 | 
			
		||||
        # Install the ingredients app
 | 
			
		||||
        'ingredients',
 | 
			
		||||
        'cookbook.ingredients',
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
Don't forget to create & run migrations:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user