*I am unable to resolve this issue .. please help me*

ValueError at /pages/About/
invalid literal for int() with base 10: 'About'
Request Method: GET
Request URL: http://localhost:8000/pages/About/
Exception Type: ValueError
Exception Value:
invalid literal for int() with base 10: 'About'
Exception Location:
/usr/lib/pymodules/python2.6/django/db/models/fields/__init__.py in
get_db_prep_value, line 361
Python Executable: /usr/bin/python
Python Version: 2.6.5
Python Path: ['/home/pankaj/bio_envision',
'/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/django_page_cms-1.1.2-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/django_staticfiles-0.2.0-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/django_authority-0.4-py2.6.egg',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/local/lib/python2.6/dist-packages']
Server time: Tue, 13 Apr 2010 21:33:23 -0500

------------------------------------------------------------------------------------------------------------------------------------
*views.py*
------------
# Create your views here.

from bio_envision.website.models import *
from django.shortcuts import *
from django.http import *
from django.template import *

def index(request):
pages = Page.objects.all()
return render_to_response('index.html', {'pages': pages},
context_instance=RequestContext(request))

def view_page(request, page_name):
try:
page = Page.objects.get(pk=page_name)
except Page.DoesNotExist:
return render_to_response("invalid_page.html")
content = page.content
pages = Page.objects.all()
return render_to_response("view.html",{"page_name" : page_name, "content" :
content, 'pages': pages,})
---------------------------------------------------------------------------------------------------------------------------------------------------------------
*urls.py*
---------------
from django.conf.urls.defaults import *

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^admin/(.*)', admin.site.root), #Lets us access the admin page
(r'^$', 'bio_envision.website.views.index'),
(r'^pages/(?P<page_name>[^/]+)/$', 'bio_envision.website.views.view_page'),
(r'^stylesheets/(?P<path>.*)$',
'django.views.static.serve',{'document_root':
'/home/pankaj/bio_envision/website/templates/stylesheets/'}),


)
--------------------------------------------------------------------------------------------------------------------------------------------------------------



-- 
-- 
--
Thanking You,

Pankaj Kumar Singh,
2nd Year Undergraduate Student,
Department of Agricultural and Food Engineering,
Indian Institute of Technology,
Kharagpur

Mobile - (+91) 8001231685

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to