This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simon Bächler
committed
Feb 8, 2012
0 parents
commit ef460a6
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Introduction | ||
============ | ||
|
||
Django-Scaffolding creates placeholder data for your app. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
Create a Scaffolding class within your model which contains the callbacks to fill it with the necesarry data:: | ||
|
||
import scaffolding | ||
|
||
class MyModel(models.Model): | ||
first_name = models.CharField('First Name', max_length=32) | ||
last_name = models.CharField('Last Name', max_length=32) | ||
comment = models.TextField('Comment') | ||
... | ||
class Scaffolding: | ||
first_name = scaffolding.first_name(max_length=32) | ||
last_name = scaffolding.last_name(max_length=32) | ||
comment = scaffolding.lorem(paragraphs=1) | ||
|
||
Run the management command to create the data:: | ||
|
||
manage.py scaffold myapp.MyModel 20 | ||
The number stands for the amout of entries. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.