django-fixtures Questions

2

We have a compressed dumpdata of 15MB upload extracting goes to 100MB. It has few models & fields that are not used in current tables. Specifically, there are few contenttypes models which can...
Issiah asked 22/5, 2014 at 3:17

4

Solved

I'm running Django 1.7. My file tree for the project is as such: /project/app/fixtures/initial_data.json /project/app/settings.py I know I can run the python manage.py loaddata app/fixtures/init...
Cosh asked 6/1, 2015 at 22:39

12

Solved

Is there anyway to load one fixture and have it load multiple fixtures? I'd ideally like to type: python manage.py loaddata all_fixtures And have that load all of the data instead of having to ...
Hogg asked 8/2, 2010 at 21:39

1

I have a fixture with list of entries. eg: [ { "fields": { "currency": 1, "price": "99.99", "product_variant": 1 }, "model": "products.productprice", "pk": 1 }, { "fields": { "currency...
Chavers asked 10/12, 2018 at 10:7

4

Solved

Django dumpdata command is broken because it does not support any reasonable way to narrow down the amount of data dumped. I need to create a fixture of various querysets (and I don't need to take ...
Subjunctive asked 20/7, 2012 at 13:6

2

Solved

I have model created field configurated as follows: created = models.DateTimeField(auto_now_add=True) In JSON fixtures I don't want to declare value for created, but when I try to load fixtures ...
Grozny asked 15/7, 2012 at 19:36

1

Solved

First, I tired this: @pytest.mark.django_db @pytest.fixture(scope='session') def created_user(django_db_blocker): with django_db_blocker.unblock(): return CustomUser.objects.create_user("Use...
Crissie asked 3/7, 2020 at 20:56

3

Solved

Before Django 1.7, when using the Django Sites Framework one could/should define the initial data using Initial Fixtures. myproject/fixtures/initial_data.json [ { "pk": 1, "model&...
Consolation asked 30/9, 2014 at 18:40

2

Solved

How to add SUPERuser(not just user) through Django fixtures? Let's say I wanna have login:admin, password:admin.
Expressive asked 16/12, 2015 at 20:4

3

Solved

How do I use GenericRelations in Django unit testing? I have read and tried countless suggestions on the internets to no avail. This one was promising Problems with contenttypes when loading a f...
Birdlime asked 21/3, 2014 at 15:33

2

Dumped data python manage.py dumpdata --format json --indent 4 --exclude auth.permission --exclude contenttypes > app/fixtures/app_test_data.json Running python manage.py test app, I get the fo...
Alumna asked 16/10, 2013 at 23:12

2

I've written Django tests using django.test.TestCase, and I'd like to use a fixture with all of my current database data to run the tests. However, if I create the fixture as follows: python manag...
Procarp asked 22/8, 2013 at 8:29

1

Solved

My models are ... class StateManager(models.Manager): def get_by_natural_key(self, name): return self.get(name=name) class DistrictManager(models.Manager): def get_by_natural_key(self, name, ...
Perr asked 7/1, 2016 at 13:0

2

Solved

Before Django 1.7 I used to define a per-project fixtures directory in the settings: FIXTURE_DIRS = ('myproject/fixtures',) and use that to place my initial_data.json fixture storing the default...
Linette asked 13/9, 2014 at 15:0

4

I'm using fixtures in my Django application but only two apps are getting their fixtures loaded. When I manually run loaddata with --verbosity=2 I can see that it only looks in two apps although I...
Slavocracy asked 2/3, 2011 at 12:13

3

Solved

I've Django project which is using South application to handle schema and data migration. In one of my applications I have migration (number 0004) which is responsible for loading data fixtures fro...
Incisure asked 9/9, 2013 at 13:3

2

Solved

Here is my problem. I am trying to load some data that has a natural key relationship to another model. I modified the parent model to generate natural keys. I exported the the data from the old...
Prosperus asked 16/1, 2014 at 1:4

2

Solved

I'm loading a fixture created with dumpdata, and getting the following exception: Problem installing fixture 'db_dump.json': Traceback (most recent call last): File "/usr/lib/python2.6/site-packa...
Drees asked 22/6, 2011 at 22:16

1

Solved

I am trying to run Selenium tests on a Django project (1.5.4), which uses South. I think South is conflicting with my tests when I try to inject initial data with fixtures, but I'm not sure why; I ...
Concourse asked 26/9, 2013 at 21:5

3

I am overriding my Django model save() method, so I can do some extra sanity checking on the object. (Is save() the correct place to do this?) It doesn't appear that my fixtures/initial_fixtures.y...
Perishing asked 24/10, 2011 at 18:15

2

Solved

I was looking at Django fixtures in the docs, there was no mention of preloading images into the database. I can't be the only who needed to do this. Is this possible? If so how? If not, are there ...
Demigod asked 20/4, 2011 at 4:38

2

I am trying to build a Django app that functions sort of like a store. Items are scraped from around the internet, and update the Django project database continuously over time (say every few...
Tartarus asked 29/7, 2011 at 20:58

2

Solved

With Django-nonrel on GAE, how do I do I load in a fixture to the server after deploying? I'm able to do it locallay via python manage.py loaddata fixturename But how can I do it on a deploye...
Vanir asked 24/10, 2011 at 22:1

1

Solved

Here's the scenario: I'm using django's admin interface and I would like to be able to load users and groups via fixtures (if this is possible.) I'm able to dump users/groups like so: manage.py d...

1

I'm trying to add generic relations and one-to-one relations support for django-test-utils makefixture command, here is the source http://github.com/ericholscher/django-test-utils/blob/master/test_...
Maggs asked 25/9, 2010 at 15:26

© 2022 - 2024 — McMap. All rights reserved.