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

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

Serving Software Downloads in 956 Categories, Downloaded 49.599.183 Times

django-fixture-magic 0.0.2

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

django-fixture-magic

Report Broken Link
Printer Friendly Version


Product Homepage
Download (33 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-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 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  
Development Tools  -  Clone Handle Object - using MATLAB OOP 1.0
The motivation for this demo is that if you have an instance (say 'a') of a custom class that subclasses 'handle', then the command 'b = a;' will produce another reference 'b' to the same object as initially referenced by 'a', effectively creating...
10 KB  
Finance  -  PDF Sign 1.1 Beta
PDF Sign is a lightweight command line utility developed in C# that will help you sign pdf files using a signing certificate in pkcs12 format. Get PDF Sign and take it for a spin to see what it can actually do for you!
 
File Cataloguers  -  UUMerge Freeware Edition 1.00
uuMerge Freeware Edition is a command line utility that can be used either to combine multiple text files into a single text file with a separator line between the contents of each file; or alternatively to process a 'merged' file (...
79 KB  
Finance  -  Word2Pdf 1.0
Word2Pdf a simple and easy-to-use Command Line-based tool that allows the user to convert Microsoft Word files to the PDF format. A graphical user interface to its function was not considered to be a high priority. The Word2Pdf software relies...
 
Finance  -  PdfSelect 1.1
PdfSelect is a useful command line utility designed to help you extract, split or reverse PDF files. Uses: Split PDF:pdfselect -p 0 c:a.pdf d: Reverse PDF:pdfselect c:a.pdf c:b..pdf Extract given pages:pdfselect -p 2-3,8-7 c:a.pdf c:b..pdf...
 
File Utilities  -  SmartFind 1.1
SmartFind is a handy command line application designed to enable you to search for strings in files. Very smart VB.Net console application, useful in batch. You can delete the files or maintain a log.
 
Programming  -  Tabulator 1.0
A set of Unix command line tools for quick and convenient batch processing of tabular text files (a.k.a., tab-delimited, csv, or flat file format) with a header line. Provides delimiter and compression detection, column reference by name. *...
49.74 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
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  
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  -  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  
Network & Internet  -  SQL Inject Me 0.4.5
SQL Inject Me is a Firefox extension used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack.
133.12 KB