Giter Club home page Giter Club logo

django-denis's People

Contributors

simobasso avatar xrmx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

simobasso

django-denis's Issues

dump tests failure: missing m2m field data?

It looks like we load the m2m middle table but we don't load the second leg of the m2m relationship, in this case testdenis.EvenMoreData;

PROCESSING testdenis.somedata
Installed 1 object(s) from 1 fixture(s)
PROCESSING testdenis.somedata_evenmore
Traceback (most recent call last):
  File "/home/rm/src/django-denis/test_django_denis/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py", line 61, in handle
    self.loaddata(fixture_labels)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py", line 97, in loaddata
    connection.check_constraints(table_names=table_names)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py", line 454, in check_constraints
    referenced_table_name, referenced_column_name))
django.db.utils.IntegrityError: Problem installing fixtures: The row in table 'testdenis_somedata_evenmore' with primary key '1' has an invalid foreign key: testdenis_somedata_evenmore.evenmoredata_id contains a value '1' that does not have a corresponding value in testdenis_evenmoredata.id.
PROCESSING testdenis.somemoredata
Installed 1 object(s) from 1 fixture(s)

Do the data recover in place instead of dumping the shell script

There could be multiple approaches:

  • still use dumpdata e loaddata internally, even if i don't know if loaddata can work from memory instead of a file
  • use dumpdata and something else to load the data back
  • just save backed up model instances to the other db but this looks painful with relations

need to specify database in loaddata

Tests are failing because we are loading data to the main db instead of the test one. This can be resolved by specifying the database in the loaddata commands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.