Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED]Syntax error in Django tutorial (LXF #165)

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Magazine and coverdiscs
View previous topic :: View next topic  
Author Message
bbagger



Joined: Sat Apr 11, 2009 7:15 pm
Posts: 12

PostPosted: Mon Dec 17, 2012 9:13 am    Post subject: [SOLVED]Syntax error in Django tutorial (LXF #165) Reply with quote

When I try to create the view described on page 82 in the tutorial I get this error message:

Code:
SyntaxError at /inventory

invalid syntax (views.py, line 7)

Request Method:    GET
Request URL:    http://127.0.0.1:8000/inventory
Django Version:    1.4.3
Exception Type:    SyntaxError
Exception Value:    

invalid syntax (views.py, line 7)

Exception Location:    /usr/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable:    /usr/bin/python2
Python Version:    2.7.3
Python Path:    

['/home/bent/pawnstore',
 '/usr/lib/python27.zip',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7/site-packages',
 '/usr/lib/python2.7/site-packages/PIL',
 '/usr/lib/python2.7/site-packages/gst-0.10',
 '/usr/lib/python2.7/site-packages/gtk-2.0',
 '/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode']

Server time:    Mon, 17 Dec 2012 03:03:31 -0600

Line 7 of views.py is:

Code:
  return render_to_response('inventory/index/html': {'latest_item_list': latest_item_list})

I have tried several alternatives within my limited Python knowledge, but have had no luck so far.

What have I done wrong?

Bent


Last edited by bbagger on Thu Feb 21, 2013 8:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
bbagger



Joined: Sat Apr 11, 2009 7:15 pm
Posts: 12

PostPosted: Thu Feb 21, 2013 8:52 pm    Post subject: Re: Syntax error in Django tutorial (LXF #165) Reply with quote

bbagger wrote:
...
What have I done wrong?
Let me answer this myself, since nobody else can: I had ommited the comma at end of the previous line. Sad
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Magazine and coverdiscs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast