Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1
Thanks everyone. Your inputs were a tremendous help. I'm slowly, but surely, getting the hang of Django. Best, S On Wed, Feb 22, 2012 at 9:19 AM, Bill Freemanwrote: > 1. There is more information in that traceback (that you didn't > include) that could help > you find your indentation error. > > 2. It is quite useful, presuming that you are also a python beginner, > to do the tutorial > at: > > http://docs.python.org/tutorial/index.html > > Bill > > On Tue, Feb 21, 2012 at 6:41 PM, Django_for_SB > wrote: > > Django Gurus, > > > > I'm an absolute beginner using Python in Django. I'm currently going > > through the tutorial, part 1, on the djangoproject.com main website: > > https://docs.djangoproject.com/en/1.3/intro/tutorial01/. I keep trying > > to complete part 1 of the tutorial, step by step, meaning, I'll go > > through the tutorial part 1, progress up to a certain point, then > > close my shell command and shut-down my computer. Then, when I get > > back to opening up the project in which I initially began working on, > > namely, "mysite" (as the tutorial instructs us to name), my shell > > commands aren't valid anymore. > > > > Example: > > > > manage.py shell -> This > > initially works if I start the project from scratch > > > > manage.py shell -> This won't > > work if I leave my project, then go back to continue to > > > > work on it later > > > > This is the error I keep getting: > > > > Traceback(most recent call last): > > > > IndentationError: unexpected Indent > > > > > > > > I'm not quite sure what's going on. Any assistance would be more than > > appreciated. What am I missing here? Thank you. > > > > Best, > > > > SB > > > > -- > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > To post to this group, send email to django-users@googlegroups.com. > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1
1. There is more information in that traceback (that you didn't include) that could help you find your indentation error. 2. It is quite useful, presuming that you are also a python beginner, to do the tutorial at: http://docs.python.org/tutorial/index.html Bill On Tue, Feb 21, 2012 at 6:41 PM, Django_for_SBwrote: > Django Gurus, > > I'm an absolute beginner using Python in Django. I'm currently going > through the tutorial, part 1, on the djangoproject.com main website: > https://docs.djangoproject.com/en/1.3/intro/tutorial01/. I keep trying > to complete part 1 of the tutorial, step by step, meaning, I'll go > through the tutorial part 1, progress up to a certain point, then > close my shell command and shut-down my computer. Then, when I get > back to opening up the project in which I initially began working on, > namely, "mysite" (as the tutorial instructs us to name), my shell > commands aren't valid anymore. > > Example: > > manage.py shell -> This > initially works if I start the project from scratch > > manage.py shell -> This won't > work if I leave my project, then go back to continue to > > work on it later > > This is the error I keep getting: > > Traceback(most recent call last): > > IndentationError: unexpected Indent > > > > I'm not quite sure what's going on. Any assistance would be more than > appreciated. What am I missing here? Thank you. > > Best, > > SB > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1
Hey I am a begginer too and i went tru the same tutorial and trust me i had so many errors and i just struggled tru.. now indentation errors are quite common. what u need to do is, go to u models.py, admin.py, views.py or any other .py file for which ever the code is written, and plz try using python editor to write instead of other text editors. they help u indent the code pretty well. and then give python manage.py shell after syncdb n validate. I am sure u ll get tru. indent your functions properly. all the best. Regards, kalyani Ram On Feb 22, 4:41 am, Django_for_SBwrote: > Django Gurus, > > I'm an absolute beginner using Python in Django. I'm currently going > through the tutorial, part 1, on the djangoproject.com main > website:https://docs.djangoproject.com/en/1.3/intro/tutorial01/. I keep trying > to complete part 1 of the tutorial, step by step, meaning, I'll go > through the tutorial part 1, progress up to a certain point, then > close my shell command and shut-down my computer. Then, when I get > back to opening up the project in which I initially began working on, > namely, "mysite" (as the tutorial instructs us to name), my shell > commands aren't valid anymore. > > Example: > > manage.py shell -> This > initially works if I start the project from scratch > > manage.py shell -> This won't > work if I leave my project, then go back to continue to > > work on it later > > This is the error I keep getting: > > Traceback(most recent call last): > > IndentationError: unexpected Indent > > I'm not quite sure what's going on. Any assistance would be more than > appreciated. What am I missing here? Thank you. > > Best, > > SB -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Calling "manage.py shell" from the Python Shell in Tutorial Part 1
Python is indentation-specific. It determines the semantics of your code by it's levels of indentation. For instance: # print False if False: print "false" print "done" if False: print "false" else: print "true" Note that inside the if block, all lines which are indented belong to that if block. The block ends when the indentation ends. The error "IndentationError: unexpected Indent" tells you that Python got an indentation it was not expecting. This could be as simple as a single space that shouldn't be there. Check your models.py and settings.py files for any lines that are indented which are not supposed to be. Furbee On Tue, Feb 21, 2012 at 3:41 PM, Django_for_SBwrote: > Django Gurus, > > I'm an absolute beginner using Python in Django. I'm currently going > through the tutorial, part 1, on the djangoproject.com main website: > https://docs.djangoproject.com/en/1.3/intro/tutorial01/. I keep trying > to complete part 1 of the tutorial, step by step, meaning, I'll go > through the tutorial part 1, progress up to a certain point, then > close my shell command and shut-down my computer. Then, when I get > back to opening up the project in which I initially began working on, > namely, "mysite" (as the tutorial instructs us to name), my shell > commands aren't valid anymore. > > Example: > > manage.py shell -> This > initially works if I start the project from scratch > > manage.py shell -> This won't > work if I leave my project, then go back to continue to > > work on it later > > This is the error I keep getting: > > Traceback(most recent call last): > > IndentationError: unexpected Indent > > > > I'm not quite sure what's going on. Any assistance would be more than > appreciated. What am I missing here? Thank you. > > Best, > > SB > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Calling "manage.py shell" from the Python Shell in Tutorial Part 1
Django Gurus, I'm an absolute beginner using Python in Django. I'm currently going through the tutorial, part 1, on the djangoproject.com main website: https://docs.djangoproject.com/en/1.3/intro/tutorial01/. I keep trying to complete part 1 of the tutorial, step by step, meaning, I'll go through the tutorial part 1, progress up to a certain point, then close my shell command and shut-down my computer. Then, when I get back to opening up the project in which I initially began working on, namely, "mysite" (as the tutorial instructs us to name), my shell commands aren't valid anymore. Example: manage.py shell -> This initially works if I start the project from scratch manage.py shell -> This won't work if I leave my project, then go back to continue to work on it later This is the error I keep getting: Traceback(most recent call last): IndentationError: unexpected Indent I'm not quite sure what's going on. Any assistance would be more than appreciated. What am I missing here? Thank you. Best, SB -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.