Skip to content

Instantly share code, notes, and snippets.

@beratdogan
Last active August 29, 2015 14:15
Show Gist options
  • Save beratdogan/e29d2f41aa9780b058ec to your computer and use it in GitHub Desktop.
Save beratdogan/e29d2f41aa9780b058ec to your computer and use it in GitHub Desktop.
[Django] Farkli App Icerisindeki Model'leri Ayni Grupta Gosterebilmek
# app_1.models.py
from django.db import models
class Model2(models.Model):
field = models.ForeignKey('app_1.Model3')
# app_2.models.py
from django.db import models
class Model3(models.Model):
field = models.CharField(max_length=80)
class Meta():
app_label = 'app_1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment