skip to navigation
skip to content

Not Logged In

django-dilla r17

General-purpose testing tool that populates your Django models with random data.

Latest Version: 0.2beta

What's Dilla?
======
General-purpose testing tool
* Django custom management command
* Random data generator
* i.e. models.SlugField() will get corporis_maxime_architecto_689 value, not hwegid24#!@#1ty51794t
* images (see Screenshots)


Why would I need that?
========================
Let's say you wrote your blog application (oh yeah, your favorite!) in Django. Unit tests went fine, and everything runs extremely fast, even those ORM-generated ultra-long queries. You've added several categorized posts and it's still stable as a rock. You're quite sure the app is efficient and ready to for live deployment. Right? Wrong.

Dilla would add hundreds of categories, posts and even photos to your app in seconds. After it's done you migh re-consider your deployment plans.

HowTos
=======

* Add Dilla to INSTALLED_APPS tuple

INSTALLED_APPS = ( ...
   'dilla',
)

* Check if it works
 $ ./manage.py help dilla
Usage: manage.py dilla [options] appname [appname ...]

...
* Make sure you're running development environment. You don't want to have your production db filled with junk, do you?
* Review your models. Maybe there are some, that you wouldn't like to be populated by Dilla?

class BlogConfiguration(models.Model):
...
   class Dilla:
      skip_model = True
      # or you might want to skip specified fields
      # skip_fields = ('hash', 'user',)

* Want Dilla to generate images for you? Just let it know.

class BlogPostImage:
   # example: sorl-thumbnail field
   image = ImageWithThumbnailsField("Blog post image", upload_to='images/%Y/%m/%d',
        thumbnail={'size': THUMB_SET[0] }, height_field = 'height', width_field = 'width',
        extra_thumbnails=THUMB_SET[1]
        )

...

   class Dilla:
        image_fields = ('image', )
        generate_images = True
        image_resolution = '640x480'

* Run 200 iterations on your app model
  $ ./manage.py dilla blog -i 200
You're done. Expect funny data. Profile your queries etc.
 
  • Downloads (All Versions):
  • 0 downloads in the last day
  • 0 downloads in the last week
  • 0 downloads in the last month