fix migrations
This commit is contained in:
parent
7922d749ab
commit
ccebb6f4a7
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
venv
|
||||
.vscode
|
||||
__pycache__
|
||||
db.sqlite3
|
||||
db.sqlite3
|
||||
website/db.sqlite3
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ class Snippet(models.Model):
|
||||
language = models.CharField(choices=LANGUAGE_CHOICES, default='python', max_length=100)
|
||||
style = models.CharField(choices=STYLE_CHOICES, default='friendly', max_length=100)
|
||||
owner = models.ForeignKey('auth.user', related_name='snippets', on_delete=models.CASCADE)
|
||||
highlighted = models.TextField
|
||||
highlighted = models.TextField()
|
||||
class Meta:
|
||||
ordering = ['created']
|
||||
|
||||
|
@ -2,14 +2,13 @@ from django.contrib.auth.models import User
|
||||
|
||||
from .models import Snippet
|
||||
from .serializers import SnippetSerializer, UserSerializer
|
||||
from .permissions import IsOwnerOrReadOnly
|
||||
from snippets.permissions import IsOwnerOrReadOnly
|
||||
from rest_framework import permissions, renderers
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.reverse import reverse
|
||||
from rest_framework import viewsets
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import permissions
|
||||
|
||||
class SnippetViewSet(viewsets.ModelViewSet):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user