Quellcode durchsuchen

Use the proxy model for Pin.submitter so Tastypie uses a correct model for its FKs

Tastypie's ModelResource makes use of the underlying Model class to figure out its fields. It obviously
breaks when there is inconsistency with models, which is rather rare, but possible to accomplish (which I've
proven with the previous commit).
tags/v1.0.0
Krzysztof Klimonda vor 11 Jahren
Ursprung
Commit
7420e8eea1
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. +2
    -1
      pinry/pins/models.py

+ 2
- 1
pinry/pins/models.py Datei anzeigen

@@ -1,13 +1,14 @@
from django.db import models
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
from django.contrib.auth.models import User

from taggit.managers import TaggableManager
import urllib2
import os
from PIL import Image

from pinry.core.models import User


class Pin(models.Model):
submitter = models.ForeignKey(User)


Laden…
Abbrechen
Speichern