omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Creating a django project via Stash

    Pythonista
    3
    7
    2525
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • codecowboy
      codecowboy last edited by

      I am getting the following error after installing django with Stash and pip:

      [~/Documents]$ django-admin.py startproject mysite
      stash: <class 'AttributeError'>: module 'django' has no attribute 'get_version'
      

      The guide here assumes a pre-existing project imported from github. https://www.wideswathresearch.com/django-development-on-an-ipad-pro/

      Anyone know if I should be able to create a fresh django project on Pythonista?

      mikael JonB 2 Replies Last reply Reply Quote 0
      • mikael
        mikael @codecowboy last edited by

        @codecowboy, unfortunately I cannot remember anyone using Django with Pythonista. This is probably because you rarely want to have a long-running web server on an iDevice, and for the more transient needs – like a quick connection from a PC, a callback server in the OAuth process, or mocking a remote API – Django is too complex, and you are better served by something like Bottle or Flask.

        1 Reply Last reply Reply Quote 1
        • codecowboy
          codecowboy last edited by codecowboy

          @mikael thanks. There are at least two posts online claiming that it is possible (one linked above) so I’d still like to get it working.

          I also found this

          It looks like the SITE_PACKAGES path is incorrect as they aren’t in my Documents folder. Does “python modules” have its own folder?

          mikael 1 Reply Last reply Reply Quote 0
          • mikael
            mikael @codecowboy last edited by

            @codecowboy, sorry, should have clicked on the link.

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by

              Are you running stash with 2.7 or 3.x interpreter?

              codecowboy 1 Reply Last reply Reply Quote 0
              • JonB
                JonB @codecowboy last edited by

                @codecowboy also, make sure you don't have a folder or script called django -- sometimes people create a quick django.py to test functionality, but then the script that importa django imports the wrong file!

                You can also check this by editing the django_admin.py to print django.file after importing.

                stashconf py_traceback 1

                Is useful for getting full traceback, or if you are comfortable with pdb,

                stashconf py_pdb 1

                Then you can check which Django is being used, etc.

                1 Reply Last reply Reply Quote 1
                • codecowboy
                  codecowboy @JonB last edited by

                  @JonB its the Python3 interpreter

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB Forums | Contributors