Re: Tests not passing in suite but pass individually

2015-12-08 Thread learn django
Hi Tim, My test case was working with new app in new project which was using default database. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } So I went back to my old app and debugged a bit. If I make

Re: problem in first part of polls app

2015-12-08 Thread sum abiut
try adding the line below at the top of your view.py if you haven't already done so. from django.http import HttpResponse Cheers, On Tue, Dec 8, 2015 at 2:56 PM, Yogs wrote: > Can somebody hlep me out with this? > This the error I get when i run the polls app > > >

Re: Template can't find image file

2015-12-08 Thread Gary Roach
OOPs forgot to include these. /root/tango/tango/urls.py is: from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^rango/', include('rango.urls', namespace='rango')), ] /root/tango/rango/urls.py is:

Re: How to write Model.get_absolute_url()?

2015-12-08 Thread Jon Ribbens
On Tuesday, 8 December 2015 00:44:02 UTC, knbk wrote: > > It seems a bit weird that that's not automatic. >> > > That's what I thought, so it's automatic in 1.9. > Ah, brilliant. > That still leaves the question of what Model.get_absolute_url() should do, >> given that it has no way to get

Re: problem in first part of polls app

2015-12-08 Thread James Schneider
On Dec 8, 2015 5:08 AM, "Yogs" wrote: > > Can somebody hlep me out with this? > This the error I get when i run the polls app > > > NameError at /polls/ > > global name 'HttpResponse' is not defined > > Request Method: > GET > Request URL: > http://127.0.0.1:8000/polls/ >

problem in first part of polls app

2015-12-08 Thread Yogs
Can somebody hlep me out with this? This the error I get when i run the polls app NameError at /polls/ global name 'HttpResponse' is not defined Request Method: GET Request URL: http://127.0.0.1:8000/polls/ Django Version: 1.9 Exception Type: NameError Exception Value: global name

Re: Template can't find image file

2015-12-08 Thread Lucas Magnum
Have you changed your urls.py? https://docs.djangoproject.com/en/1.9/howto/static-files/#serving-static-files-during-development []'s Lucas Magnum. 2015-12-07 21:45 GMT-02:00 Gary Roach : > While I'm working with "Tango with Django" I am using Django 1.8 and >