🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

grunt-django-manage-2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-django-manage-2

Run Django manage.py commands

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

Build Status devDependency Status

grunt-django-manage

Grunt tasks to run common django management commands

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-django-manage --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-django-manage');

Usage

Basic setup

grunt.initConfig({
    'django-manage': {
        options: {
            app: 'myApp',
            settings: 'test'
        },
        loaddata: {
            options: {
                command: 'loaddata',
                args: [
                    './fixtures/user.json',
                    './fixtures/postcodes.json'
                ]
            }
        }
    }
});

To run a loaddata command with django-manage you would run the following

Running

grunt django-manage:loaddata
// This will run
// python manage.py loaddata ./fixtures/user.json ./fixtures/postcodes.json --settings=myApp.settings.test

Changing options in commands

grunt.initConfig({
    'django-manage': {
        options: {
            app: 'myApp',
            settings: 'test'
        },
        loaddata: {
            options: {
                command: 'loaddata',
                args: [
                    './fixtures/user.json',
                    './fixtures/postcodes.json'
                ]
            },
            live: {
                settings: 'live'
            }
        }
    }
});

To run loaddata using live settings you would instead run

grunt django-manage:loaddata:live
// This will run
// python manage.py loaddata ./fixtures/user.json ./fixtures/postcodes.json --settings=myApp.settings.live

Contribuiting

If you would like to contribute to the project please check the CONTRIBUTING file

License

The license file can be found here

Keywords

django

FAQs

Package last updated on 30 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts