Ticket #6961: patch3.txt

File patch3.txt, 690 bytes (added by HuCy, 15 years ago)

Another approach. Found this Ticket too late, so i did a patch by myself.

Line 
1Index: django/core/management/commands/loaddata.py
2===================================================================
3--- django/core/management/commands/loaddata.py (revision 11027)
4+++ django/core/management/commands/loaddata.py (working copy)
5@@ -76,7 +76,8 @@
6 if has_bz2:
7 compression_types['bz2'] = bz2.BZ2File
8
9- app_fixtures = [os.path.join(os.path.dirname(app.__file__), 'fixtures') for app in get_apps()]
10+ app_fixtures = [os.path.join(os.path.dirname(app.__file__.rsplit('models', 1)[0]), 'fixtures')
11+ for app in get_apps()]
12 for fixture_label in fixture_labels:
13 parts = fixture_label.split('.')
14
Back to Top