What do I need to import to gain access to my models?

前端 未结 5 1023
面向向阳花
面向向阳花 2020-12-31 18:09

I\'d like to run a script to populate my database. I\'d like to access it through the Django database API.

The only problem is that I don\'t know what I would need t

5条回答
  •  庸人自扰
    2020-12-31 18:38

    The cleanest solution is to add django extensions.

    (virt1)tsmets@calvin:~/Documents/prive/rugby-club/proposal/kitu$ yolk -l
    Django          - 1.3.1        - active 
    Pygments        - 1.4          - active 
    Python          - 2.6.5        - active development (/usr/lib/python2.6/lib-dynload)
    django-extensions - 0.7.1        - active 
    pip             - 1.0.2        - active 
    setuptools      - 0.6c11       - active 
    wsgiref         - 0.1.2        - active development (/usr/lib/python2.6)
    yolk            - 0.4.1        - active 
    

    The list of possible commands is then extended with among other things the runscript command.

提交回复
热议问题