Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.972.370 Times

django-fixture-magic 0.0.2

Company: Dave Dash
Date Added: July 26, 2013  |  Visits: 218

django-fixture-magic

Report Broken Link
Printer Friendly Version


Product Homepage
Download (16 downloads)



The django-fixture-magic package contains a few extra management tools to handle fixtures.<br /><br />Installation:<br /><br />You can get fixture-magic from pypi with:<br /><br />pip install django-fixture-magic<br /><br />The development version can be installed with:<br /><br />pip install -e git://github.com/davedash/django-fixture-magic#egg=django_fixture_magic<br /><br />fixture-magic adds two commands to manage.py therefore you should add it to your INSTALLED_APPS in settings.py:<br /><br />INSTALLED_APPS = (<br /> ...<br /> 'fixture_magic',<br /> ...<br />)<br /><br />Usage:<br /><br />There are four commands. dump_object returns the json representation of a specific object as well as all its dependencies (as defined by ForeignKeys).<br /><br /> ./manage.py dump_object APP.MODEL PK1 PK2 PK3 ... > my_new_fixture.json<br /><br />You can now safely load my_new_fixture.json in a test without foreign key i errors.<br /><br />The second command is merge_fixtures. This command takes several fixture files and does a simple de-dupe operation (based on model and pk) and returns a clean json file. This is helpful if you have multiple json fixtures that might have redundant data.<br /><br /> ./manage.py merge_fixtures fixture1.json fixture2.json fixture3.json ... > all_my_fixtures.json<br /><br />The third command is reorder_fixtures. This command takes a single file and several model names (in app.model format as they are specified in fixture files). This reorders your fixtures so the models you specifiy first show up in the fixture first. This is helpful if you tend to get foreign-key errors when loading models.<br /><br /> ./manage.py reorder_fixtures fixture.json APP1.MODEL1 APP2.MODEL2 ... > ordered_fixture.json<br /><br />Unspecified models will be appended to the end.<br /><br />The fourth command is custom_dump. This reads a setting CUSTOM_DUMPS:<br /><br />## Fixture Magic<br />CUSTOM_DUMPS = {<br /> 'addon': { # ./manage.py custom_dump addon id<br /> 'primary': 'addons.addon', # This is our reference model.<br /> 'dependents': [ # These are items we wish to dump.<br /> 'current_version',<br /> # Magic turns this into current_version.files.all()[0].<br /> 'current_version.files.all.0',<br /> ],<br /> 'order': ('app1.model1', 'app2.model2',) # stuff gets sorted<br /> }<br />}<br /><br />It runs the equivalent of dump_object on the dependents (which in turn pick up the primary object). The JSON dumps are then merged together. Very handy for dumping multi-dependent objects.<br /><br />#md5=7273966761a65073b7702dc81198032f

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Command Commands Custom Dump Django Django Fixture Django Fixture Magic Dump Object Files Fixture Fixture Magic Fixtures Helpful Install Magic Managepy Merge Fixtures Model Models Object Reorder Fixtures Returns Takes Withpip
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


DJANGO-FIXTURE-MAGIC RELATED
Network & Internet  -  django-autoslug-field 0.2.1
AutoSlugField for Django based on django-extensions AutoSlugField, adds option to track foreignkey/parent field for slug.
10.24 KB  
Network & Internet  -  django-xauth 0.0.6
Django-xauth is django application which is all-in-one solution for registration on the site via different 3rd part services like openid, oauth, etc. Xauth consists of services. For now only openid and oauth is available. Each service enables your...
5.59 MB  
Utilities  -  django-brainstorm 0.1
Django brainstorming site django-brainstorm is a Django plugin for creating a site with multiple areas to brainstorm ideas. This app powers http://feedback.sunlightfoundation.com/hackathon/ and...
10.24 KB  
Games  -  django-staticfiles 1.2.1
This is a Django app that provides helpers for serving static files. Django developers mostly concern themselves with the dynamic parts of web applications -- the views and templates that render new for each request. But web applications have...
40.96 KB  
Network & Internet  -  django-qwert 0.1.5
django-qwert is django's snippets collection by Alisue each snippets' has different author so please checkout the link on the each file's comment. (some code is written by me or couldn't find source url)
10.24 KB  
Network & Internet  -  django-userpreferences 0.1
django-userpreferences requires django-picklefield. When upgrading you need south.
30.72 KB  
Utilities  -  DAAT 1.0.2
A portable JavaScript application that provides automated access to remote devices, configurable software/command executions, custom module integration and powerful log file transformations. Managing different types of network attached devices...
36.09 MB  
Shell & Desktop  -  bLogbook 1
bLogbook is a shell script that makes it easy to keep notes. bLogbook project uses the file system to manage a hierarchical set of "folders" and files. bLogbook is configurable and extensible. Extensions can be added using the available plugin...
21.5 KB  
Programming  -  PEBrowse Crash-Dump Analyzer 2.4
PEBrowse Crash-Dump Analyzer is a Windows usermode crash-dump analysis tool. It builds upon the frameworks presented in PEBrowse Professional and PEBrowse Professional Interactive to offer a user mode crash-dump analysis tool that is both powerful...
1.4 MB  
Video Editors  -  avidentify 0.02
avidentify is a command line tool that extracts and prints various meta-information about media files: width, height, frame rate, video codec, audio codec, audio sample rate, audio bitrate, file format, etc. avidentify uses ffmpegs libavformat...
788.48 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  IPv6 CARE 3.2b
IPv6 CARE, "IPv6 Compliant Automatic Runtime Environment", is a Linux tool able to patch ipv6-agnostic programs on-the-fly ('patch' mode). It can also generate a diagnosis about the IPv6 compliance of an application ('check' mode).
409.6 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB