Need Django Help Again.

22 views
Skip to first unread message

Steve Burrus

unread,
Jul 22, 2015, 12:11:20 PM7/22/15
to Django users
I find myself in ned of help yet again w. django. Just to say parenthetically I have had this problem before. just what am I doing wrong with the command "python .\Scripts\ django-admin.py startproject me" to consistently get this error message! Thanx to anyone who helps me.   

"C:\Users\SteveB\Desktop\burrus>.\Scripts\activate
(burrus) C:\Users\SteveB\Desktop\burrus>python .\Scripts\ django-admin.py startproject me
C:\Users\SteveB\Desktop\burrus\Scripts\python.exe: can't find '__main__' module in '.\\Scripts\\'"

Tom Lockhart

unread,
Jul 22, 2015, 12:35:19 PM7/22/15
to django...@googlegroups.com
C:\Users\SteveB\Desktop\burrus\Scripts\python.exe: can't find '__main__' module in '.\\Scripts\\’"

You seem to have a space after the “\Scripts\”.

hth

- Tom

Bill Freeman

unread,
Jul 22, 2015, 12:45:19 PM7/22/15
to django-users
Try no space between ".\Scripts\" and "django-admin.py"

You could also try forward slashes on the django-admin.py line (I think that you need the back slashes on the activate line).

And I don't think that you need the ".\" on the django-admin.py line.

And, if that activate is activating a virtualenv (as the "(burrus)" might seem to imply), then you might be able to just do:

    python django-admin.py startproject me

(but I'm not that familiar with virtualenv on Windows.  On *nix it's all about path modification, so the django-admin.py might just be found.)

Also worth trying is:

   django-admin.py startproject me

Perhaps someone who actually uses Windows for django development could chime in?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/98551cf6-475c-41f9-b7a1-1ce5eecc30ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Burrus

unread,
Jul 22, 2015, 12:51:29 PM7/22/15
to django...@googlegroups.com
well tom tjhanx for your  attempted help but it still didn't work after I took care of that space after "\Scripts\"!  here is my error message now : "python: can't open file '.\Scripts\django-admin.py': [Errno 2] No such file or directory".

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/uxHvoccBiZc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Steve Burrus

unread,
Jul 22, 2015, 12:58:41 PM7/22/15
to django...@googlegroups.com
well I haVE tried both this "python .\Scripts\django-admin.py startproject me" and Bill's suggestion opf  "python django-admin.py startproject me" but both haVE failed! I'll try Bill's other suggestion of the forward slashes but I doubt it will work.

Bill Freeman

unread,
Jul 22, 2015, 1:04:07 PM7/22/15
to django-users
I presume that you have actually checked for a django-admin.py file in the Scripts directory?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Steve Burrus

unread,
Jul 22, 2015, 1:17:05 PM7/22/15
to django...@googlegroups.com
Okay it's a case of "my bad". I got it gpoing. I had just forgotten to do this command : "pip install django" in the "burrus" virtual environment inst ance! I still have the shakiest knowledge of django in general so little mistakes like this I am gonna have a little while longer.

Bill Freeman

unread,
Jul 22, 2015, 2:22:06 PM7/22/15
to django-users
That's actually a virtualenv mistake, rather than a django mistake.  Whenever things don't behave in a VE try "pip freeze" to see if things are as you expect.

Steve Burrus

unread,
Jul 22, 2015, 3:07:58 PM7/22/15
to django...@googlegroups.com
say do yoiu know of a handy series of tutorials I can use to actually do something in Django beyond merely connecting to the server and maybe configuring the admin? I am getting tired of just connecting to the server and then "calling it a day" if you know what I mean.



Bill Freeman

unread,
Jul 22, 2015, 4:21:28 PM7/22/15
to django-users
Unless it has changed, the tutorial at docs.djangoproject.com shows creation of an app, use of templates, forms, etc.  All the building blocks for the back end (which is what django is).  Those are the skills that have been the base of several sites that I've built.  If your site wants to have other features, like text search, or social auth, or blogs, or shopping carts, there are add on apps for those things that you can find with google, and which typically have reasonable example usage in their documentation.  (That's not to say that you won't choose home grown over some of them, if you needs are a bit different.)

The real trick is knowing what you want to do.  A toy site that you create as a "learning exercise" is probably going to feel like a toy (like those things they have you write in a collage level CS class).  If you have something that you want to put before the world, you will figure out how to make it feel sharper.  Having a real project in mind is, as always, the hard part.

And, as mentioned, django is just the server side.  You need to understand HTML, CSS, and, probably JavaScript and some of its frameworks, like jQuery or D3.  Unless your project is non-browser, in which case you need to understand HTTP anyway, and maybe Rest, and probably still HTML (since that's what the request chain expects.

So, I'd suggest finishing the official tutorial, if you haven't already.  Then look at some add-ons like a blog, a CMS, or a shopping cart, mostly to see how to add a third party app and configure it.  Then perhaps you'll have though of something that you want to build for yourself.

Reply all
Reply to author
Forward
0 new messages