Module ImportFrom alias ImportFrom alias alias alias ImportFrom alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assert CompareIsNot AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assert BoolOpAnd AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad NameLoad attr body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Dict NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad Return BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Str ListLoad Expr Call AttributeLoad NameLoad attr Num Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr NameLoad Call NameLoad NameLoad Str NameLoad Assert CompareIsNot NameLoad NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListComp TupleLoad NameLoad Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str NameLoad If NameLoad body For NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad If NameLoad body Return NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore ListComp NameLoad comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr Return Lambda arguments args NameParam NameParam defaults SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad If Call AttributeLoad NameLoad attr body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body For NameStore ListComp NameLoad comprehension NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num For NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr BoolOpAnd AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Return Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Dict AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Break Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd NameLoad Num AttributeLoad NameLoad attr For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return TupleLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Raise decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad keyword ListLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A django.conf settings django.db.models get_app get_models get_model django.db transaction N/A random N/A logging N/A traceback N/A log N/A N/A logging getLogger __name__ N/A __author__ Adam Rutkowski <adam@mtod.org> N/A __contributors 
Adolfo Fitoria (https://github.com/fitoria)
Rob Berry (https://github.com/rob-b)
Rafal Galczynski (https://github.com/rgsoda)
Alfredo Aguirre (https://github.com/alfredo/)
Philip Kalinsky (https://github.com/psychotechnik)
Mark Lavin (https://github.com/mlavin)
 N/A __version__ 0.2beta AbstractRecord N/A object N/A N/A The class provides a little abstraction layer over either     a Django application, database model or specific database field.
     __init__ N/A N/A self app model field N/A None None N/A N/A N/A self app app N/A N/A self model model N/A N/A self field field N/A N/A self many_to_many False N/A N/A self obj None N/A is_app N/A N/A self N/A N/A N/A N/A N/A N/A self model N/A N/A self field N/A is_model N/A N/A self N/A N/A N/A N/A N/A self model N/A N/A self field N/A is_field N/A N/A self N/A N/A N/A N/A N/A self model N/A self field N/A create_object N/A N/A self N/A N/A N/A N/A N/A self model None N/A Klass N/A self model N/A N/A self obj N/A Klass N/A N/A self obj N/A set_object_property N/A N/A self value N/A N/A N/A N/A N/A self obj N/A N/A self is_field N/A N/A N/A self many_to_many N/A self obj N/A N/A self field name value N/A N/A manager N/A getattr N/A self obj N/A N/A self field name N/A N/A N/A manager add value N/A N/A N/A self obj N/A N/A self field name value N/A N/A N/A setattr N/A self obj N/A N/A self field name value N/A N/A self obj N/A save N/A N/A self N/A N/A N/A N/A N/A N/A self obj save N/A __repr__ N/A N/A self N/A N/A N/A N/A N/A self is_app N/A N/A N/A self app N/A N/A N/A self is_model N/A N/A N/A %s.%s N/A N/A self app N/A N/A self model __name__ N/A N/A N/A self is_field N/A N/A N/A %s.%s.%s N/A N/A self app N/A N/A self model __name__ N/A N/A self field name N/A __str__ N/A N/A self N/A N/A N/A N/A N/A self __repr__ N/A __unicode__ N/A N/A self N/A N/A N/A N/A N/A self __repr__ N/A N/A SpamRegistry N/A object N/A N/A Container storing spamming function references.
    Strict handlers are functions being directly intended to provide
    random data for one specific field.
    Global handlers provide random data to all fields of specific
    internal type.

    Every handler function should accept ``field`` argument.
    This is in fact an instance of any object derived from
    django.db.models.fields.Field

    Every handler function should return value applicable for the input field,
    with respect to django.db.Model attribute setting interface.

    NOTE:

        ManyToMany handlers should return values that are valid for
        django.db.models.fields.related.ManyRelatedManager.add()

    Example usage:

        from dilla import spam
        import string
        import random

        @spam.global_handler('CharField') # field.get_internal_type()
        def get_chars(field):
            return random.choice(string.ascii_letters)

        @spam.strict_handler('blog.Post.title')
        def get_blog_post_title(field):
            return random.choice(string.ascii_letters)
     __init__ N/A N/A self N/A N/A N/A N/A self global_handlers N/A N/A N/A self strict_handlers N/A N/A _decorate N/A N/A self key attr N/A N/A fn N/A N/A f N/A N/A N/A N/A N/A attr update N/A key f N/A f N/A N/A fn N/A strict_handler N/A N/A self field_qname N/A N/A N/A N/A N/A self _decorate field_qname N/A self strict_handlers N/A global_handler N/A N/A self field_type N/A N/A N/A N/A N/A self _decorate field_type N/A self global_handlers N/A get_handler N/A N/A self record strict N/A False N/A N/A strict N/A N/A N/A N/A N/A self strict_handlers get N/A str record None N/A N/A N/A N/A N/A self strict_handlers get N/A str record None N/A N/A N/A self global_handlers get N/A N/A N/A record field get_internal_type None N/A __repr__ N/A N/A self N/A N/A N/A N/A strict_handlers: %s 
global handlers: %s N/A N/A self strict_handlers N/A self global_handlers N/A __str__ N/A N/A self N/A N/A N/A N/A N/A self __repr__ N/A N/A N/A spam N/A SpamRegistry Dilla N/A object N/A N/A 
    Dilla is a multi-purpose general testing tool for automated
    database spamming, intented to use with projects built on top of Django,
    populating data within any number of internal applications.

    Django SETTINGS used by Dilla class:

        DILLA_APPS = []           # Required, pretty much self-explanatory
                                  # Example value: ['blog', 'auth']
        DILLA_SPAMLIBS = []       # Optional list of user defined field
                                  # handlers to import.
                                  # See dilla.SpamRegistry
                                  # Example value:
                                  #       'blog.custom_blog_spammers']
        DILLA_EXCLUDE_MODELS = [] # Optional list of models to omit
                                  # Example value: ['blog.comment']

    One cycle of Dilla run means discovering all the application(s) models
    and saving database data generated by spamlibs.
    Default spamlib is bundled with Dilla under dilla.spammers and covers
    most of Django model fields. Development goal is to cover all of them.
     __init__ N/A N/A self apps cycles use_coin spamlibs single_transaction N/A None 1 True None True N/A N/A N/A spamlibs None N/A N/A spamlibs N/A getattr settings DILLA_SPAMLIBS N/A N/A N/A N/A spamlibs insert 0 dilla.spammers N/A lib spamlibs N/A N/A N/A N/A log debug N/A Importing spamlib %s lib N/A N/A N/A self _dyn_import lib N/A app_list N/A apps N/A getattr settings DILLA_APPS None N/A N/A app_list None Either you have not provided Dilla.apps         parameter or settings.DILLA_APPS         is missing N/A N/A self spam_registry spam N/A N/A self apps app_list N/A N/A self cycles cycles N/A N/A self use_coin use_coin N/A N/A self appmodels N/A N/A N/A self current None N/A N/A self rows_affected 0 N/A N/A self fields_spammed 0 N/A N/A self fields_omitted 0 N/A discover_models N/A N/A self N/A N/A N/A apps N/A N/A app N/A get_app app N/A app N/A self apps N/A N/A app_name app_module apps N/A N/A N/A N/A self appmodels N/A app_name N/A N/A models N/A get_models app_module N/A models_to_exclude N/A getattr settings DILLA_EXCLUDE_MODELS None N/A models_to_exclude N/A N/A excluded_model models_to_exclude N/A N/A N/A N/A N/A N/A models remove N/A get_model N/A N/A excluded_model split . N/A N/A N/A ValueError N/A N/A N/A N/A N/A N/A N/A self appmodels N/A app_name extend models N/A N/A N/A log debug N/A Preparing to spam following models: %s N/A self appmodels N/A find_spam_handler N/A N/A self record N/A N/A N/A strict_handler N/A N/A N/A self spam_registry get_handler record strict True N/A strict_handler N/A N/A strict_handler N/A N/A N/A record field choices N/A N/A choices N/A c N/A c N/A N/A record field choices N/A N/A N/A N/A x y N/A N/A N/A N/A random choice choices N/A 0 N/A N/A N/A N/A self spam_registry get_handler record strict False N/A spam N/A N/A self record N/A N/A N/A This is where the magic happens and AbstractRecords evolve. N/A N/A N/A log debug N/A [ --> Spam %s ] record N/A N/A self current record N/A N/A N/A record is_app N/A N/A model N/A N/A N/A self appmodels get N/A str record N/A N/A N/A record model model N/A N/A N/A record create_object N/A N/A record field None N/A N/A N/A self spam record N/A N/A N/A N/A record is_model N/A N/A field N/A field N/A field N/A N/A N/A record model _meta fields N/A N/A field auto_created N/A N/A N/A record many_to_many False N/A N/A record field field N/A N/A N/A self spam record N/A N/A N/A record save N/A N/A self rows_affected 1 N/A field N/A N/A N/A record model _meta many_to_many N/A N/A N/A record field field N/A N/A record many_to_many True N/A N/A N/A self spam record N/A N/A N/A N/A record is_field N/A N/A N/A N/A N/A record field blank N/A N/A self use_coin N/A N/A self _coin_toss N/A N/A N/A self fields_omitted 1 N/A N/A N/A log debug Using coin -- simon says, skip this record. N/A N/A handler N/A N/A self find_spam_handler record N/A N/A handler None N/A N/A value N/A handler record N/A record field N/A N/A N/A record field unique N/A N/A manager N/A N/A record model _default_manager N/A i N/A range 5 N/A N/A N/A N/A _match N/A N/A manager get N/A N/A N/A record field name value N/A value N/A handler record N/A record field N/A N/A N/A N/A N/A record model DoesNotExist N/A e N/A N/A N/A N/A N/A record set_object_property value N/A N/A self fields_spammed 1 N/A N/A N/A N/A log warn N/A Handler not found for %s record N/A run N/A N/A self N/A N/A N/A N/A N/A N/A N/A self discover_models N/A cycle N/A range N/A self cycles N/A N/A N/A N/A log info N/A spamming cycle: %d/%d N/A N/A cycle 1 N/A self cycles N/A app N/A N/A N/A self appmodels keys N/A N/A N/A N/A self spam N/A AbstractRecord app N/A N/A N/A transaction commit N/A N/A N/A len N/A self apps N/A self rows_affected N/A self fields_spammed N/A self fields_omitted N/A N/A N/A Exception N/A e N/A N/A N/A N/A log critical N/A %s e N/A N/A N/A transaction rollback N/A N/A N/A transaction commit_manually _dyn_import N/A N/A self name N/A N/A N/A N/A mod spamlib N/A N/A name rsplit . 1 N/A m N/A __import__ mod fromlist N/A spamlib N/A N/A getattr m spamlib N/A _coin_toss N/A N/A self N/A N/A N/A N/A bool N/A N/A random randrange 2 N/A N/A