Skip to content

sproutcoreisyournewbicycle/django-spoutcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

The django-sproutcore library is made up of several parts.

  1. An scgen management command, which generates best-guess matching SproutCore models from you Django models.
  2. A SproutCore admin interface for your server-side Django models that can replace (eventually) Django's own built-in admin app. The admin interface makes use of scgen's model generation.
  3. Helpers for providing a RESTful API for custom SproutCore applications.

Requirements

The scgen command has no external dependencies (aside from Django, obviously).

To use the SproutCore admin interface, or the REST API helpers, it is necessary to install the wonderful django-piston framework, as it is used for providing the basic REST interface.

Using scgen to generate SproutCore models

django-sproutcore comes with an scgen Django management command which allows you to auto-generate best guess SproutCore models from your django models. This can help greatly speed up initial SproutCore development and prototyping.

The command can be run like any other Django management command. After adding the djangocore app to INSTALLED_APPS in your project's settings.py file, cd to your project directory and run python manage.py scgen. If successful, scgen will create sproutcore folder in your current working directory with the auto-generated models inside of it.

Available options

The scgen command has a number of useful options for specifying exactly what models to generate and where to generate them.

[<appname> ...] or [<appname>.<modelname> ...]

Explicitly specify which apps (and/or specific models) should be auto-generated by scgen using positional arguments. Any number of apps and/or models may be specified. Takes precedence over the exclude argument.

-d --directory <path>

The path to the directory where scgen should auto-generate your SproutCore models. If the specified path is not absolute, it will be relative to your current working directory.

-e --exclude <app_name>

The name of an app to exclude from model auto-generation. Multiple apps can be excluded by using multiple -e or --exclude arguments. Will not exclude apps or models specified explicitly with positional arguments.

Available settings

django-sproutcore makes use of a number of settings if given in your project's settings.py file.

SPROUTCORE_ROOT

An absolute path to the folder where scgen should auto-generate your SproutCore models. By default, models are generated inside of a sproutcore folder within the current working directory.

SPROUTCORE_MAX_OBJECTS_PER_REQUEST

An integer indicating the maximum number of objects a client can request at once. Defaults to 300.

About

a Django application that auto-generates a SproutCore datastore framework [done] and admin application [in progress] for your Django project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published