1👍
Here is the Source of Site
Since there is no app_name
specified the default is taken. Hence the app_name
Here is site
0👍
This is a data migration from one of my projects which adds the current site (i. e. settings.SITE_ID
) to each Gallery object:
class Migration(DataMigration):
def forwards(self, orm):
current_site = orm['sites.Site'].objects.get(pk=settings.SITE_ID)
for gallery in orm.Gallery.objects.all():
gallery.sites.add(current_site)
def backwards(self, orm):
raise RuntimeError("Cannot reverse this migration.")
👤jnns
- [Answer]-Django default settings 1.6 BASE_DIR acting up
- [Answer]-Python3: disabling print statement depending on server
Source:stackexchange.com