Skip to content

Commit

Permalink
Merge pull request #125 from magnunleno/fix/dump-fixture-app-name
Browse files Browse the repository at this point in the history
Make dump_fixture APP_NAME aware
  • Loading branch information
max-arnold committed Sep 22, 2016
2 parents 8dd4cb5 + 953b409 commit e5a66f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cities_light/management/commands/cities_light_fixtures.py
Expand Up @@ -16,7 +16,7 @@
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError

from ...settings import DATA_DIR, FIXTURES_BASE_URL
from ...settings import DATA_DIR, FIXTURES_BASE_URL, CITIES_LIGHT_APP_NAME
from ...downloader import Downloader


Expand Down Expand Up @@ -122,9 +122,12 @@ def dump_fixture(self, fixture, fixture_path):

def dump_fixtures(self):
"""Dump Country/Region/City fixtures."""
self.dump_fixture('cities_light.Country', self.country_path)
self.dump_fixture('cities_light.Region', self.region_path)
self.dump_fixture('cities_light.City', self.city_path)
self.dump_fixture('{}.Country'.format(CITIES_LIGHT_APP_NAME),
self.country_path)
self.dump_fixture('{}.Region'.format(CITIES_LIGHT_APP_NAME),
self.region_path)
self.dump_fixture('{}.City'.format(CITIES_LIGHT_APP_NAME),
self.city_path)

def load_fixture(self, source, destination, force=False):
"""Download and import single fixture."""
Expand Down

0 comments on commit e5a66f1

Please sign in to comment.