TemplateDoesNotExist

2011-03-13 Thread Vijay
When i am practicing Django in chapter 7(forms), I am getting 'TemplateDoesNotExist' error.Here's the error details TemplateDoesNotExist at /search-form/ search_form.html Request Method: GET Request URL:http://127.0.0.1:8000/search-form/ Django Version: 1.2.5 Exception Type:

Re: Rendering JSON from Django Views

2011-03-13 Thread yongzhen zhang
Hi, Anyone can provide the further help? It seems this method has some shortage, because the Continent is not related with Country. How can i get the countries that under the certain continent by the ForeignKey: continent=models.ForeignKey('Continent')? On Mar 12, 6:50 pm, Ezequiel Marquez wrote:

Re: Rendering JSON from Django Views

2011-03-13 Thread gladys
> How can i get the countries that under the certain continent by the > ForeignKey: continent=models.ForeignKey('Continent')? If you have a Continent object c: c.country_set.all() will give the related countries. -- Gladys http://bixly.com On Mar 13, 7:55 pm, yongzhen zhang <4...@live.cn> wrot

Re: TemplateDoesNotExist

2011-03-13 Thread gladys
Make sure that the TEMPLATE_DIRS is set in your settings.py if you are putting your templates in a folder other than your_app/templates. -- Gladys http://bixly.com On Mar 13, 7:48 pm, Vijay wrote: > When i am practicing Django in chapter 7(forms), I am getting > 'TemplateDoesNotExist' error.Her

[CodeFest] Participate in Manthan - Algorithm Intensive Programming Contest

2011-03-13 Thread vishal kumar rai
Hello, *CodeFest'11* , the annual online international coding festival of Computer Engineering Society IT-BHU, presents Manthan- the *algorithm intensive* programming contest. The contest aims to provide a platform for progra

Re: TemplateDoesNotExist

2011-03-13 Thread vijay
Hi Gladys, Thanks for quick reply. Following content is there at TEMPLATE_DIRS.what i should change at this.Please suggest me. TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't

Re: TemplateDoesNotExist

2011-03-13 Thread Daniel Roseman
On Sunday, March 13, 2011 8:40:06 AM UTC-4, Vijay wrote: > > Hi Gladys, > Thanks for quick reply. > Following content is there at TEMPLATE_DIRS.what i should change at > this.Please suggest me. > > > TEMPLATE_DIRS = ( > # Put strings here, like "/home/html/django_templates" or > "C:/www/djang

Re: Authentication Using django.contrib.auth.middleware.AuthenticationMiddleware

2011-03-13 Thread gladys
If I understand correctly, you want the ordinary users to login to the admin login page. That is not how it works. You need to specify a url that will point to django.contrib.auth.views if you want to use the built-in authentication framework. I use / accounts just to keep it clean. #urls.py

Re: TemplateDoesNotExist

2011-03-13 Thread vijay
Thanks Gladys.Problem solved.Once again thank you so much for quick reply vijay On Sun, Mar 13, 2011 at 5:45 AM, Daniel Roseman wrote: > On Sunday, March 13, 2011 8:40:06 AM UTC-4, Vijay wrote: >> >> Hi Gladys, >> Thanks for quick reply. >> Following content is there at TEMPLATE_DIRS.what i shoul

Re: How do I run test and get results programmatically? (django, south, fixtures, sqlite)

2011-03-13 Thread gladys
I'm not sure if this is what you need, but if the problem is with the migrations not being run, you can specify a setting in your settings.py to use syncdb when running tests. #settings.py SOUTH_TESTS_MIGRATE = False # make test database created using syncdb rather than migrations Goodluck. -- G

request.session.session_key always new

2011-03-13 Thread Alexander Bolotnov
Hi, I'm trying to pay around with sessions and here is how it's setup: MIDDLEWARE_CLASSES = ( ... 'django.contrib.sessions.middleware.SessionMiddleware', ) TEMPLATE_CONTEXT_PROCESSORS = ( ... "django.contrib.auth.context_processors.auth", "django.core.context_processors.request" ) INSTA

Re: Multiple modelforms in single POST

2011-03-13 Thread gladys bixly
If you look at this code: class Profileform(forms.ModelForm): class Meta: model = User fields = ('first_name','last_name','email',) class Employeeform(forms.ModelForm): """self explanatory""" class Meta(Profileform): model = P

Re: How to use CreateView?

2011-03-13 Thread chandan_u2
On Mar 12, 2:41 am, hassan wrote: > Hi, hi > and in views.py: > > class BookUpdateView(CreateView): >     model = Book >     template_name = "create_book.html" > try loading the context processors in ur views, http://docs.djangoproject.com/en/dev/topics/class-based-views/#adding-extra-conte

django-registration - Activate view not works

2011-03-13 Thread Sergio Berlotto Jr
I'm using django-registration. The activation email is generated correctly, but when i'm trying to activate the new user with generated key sent by e-mail, in url http://server.com/accounts/activate/ee3ad866abca8bf0d29d71870a79a3b84cd9c965/ this only returns failure, and not activate the account

Re: django-registration - Activate view not works

2011-03-13 Thread Cromulent
What is the error message you receive? On Mar 13, 5:27 pm, Sergio Berlotto Jr wrote: > I'm using django-registration. > The activation email is generated correctly, but when i'm trying to activate > the new user with generated key sent by e-mail, in > urlhttp://server.com/accounts/activate/ee3ad

Re: django-registration - Activate view not works

2011-03-13 Thread Sergio Berlotto Jr
The variable "activation_key" is blank, with no value, and the result os activation redirect always to activation_failed view. -- 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. T

app/model not showing in admin interface?

2011-03-13 Thread Mark J. Nenadov
Hello folks! I'm trying to get some of my apps/models to display in mysite:8000/admin/ and am not having any luck. I have my app's admin.py setup like so: >> from app.models import Task >> from django.contrib import admin >> >> admin.site.register(App) django.contrib.admin is enabled in my INSTA

Re: app/model not showing in admin interface?

2011-03-13 Thread Mark J. Nenadov
Sorry, that code from admin.py should read: >> from app.models import Task >> from django.contrib import admin >> admin.site.register(Task) ~Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-user

Primary keys in multi-table inheritance

2011-03-13 Thread Torsten Bronger
Hallöchen! Can one rely on the fact that a model instance and its parent model instance share the same PK value in multi-table inheritance? (Given that there is only one non-abstract parent model, and no explicit link to the parent.) Tschö, Torsten. -- Torsten BrongerJabber ID: torsten.bro

Re: django-registration - Activate view not works

2011-03-13 Thread Sergio Berlotto Jr
Well, I'll try the http://django-userena.org becouse django-registration is stoped development since March/2010. -- 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

how to search data from tables

2011-03-13 Thread django beginner
Hi all, I would like to know is there any way I can search any data from tables given some parameters: Suppose I have this person model: class Person(models.Model): userid = models.AutoField(primary_key=True) fname = models.CharField(max_length=30) lname = models.CharField(max_length=

Re: how to search data from tables

2011-03-13 Thread robin nanola
have you read the documentation already? i think this might help you http://docs.djangoproject.com/en/1.2/topics/db/queries/ On Mon, Mar 14, 2011 at 11:20 AM, django beginner wrote: > Hi all, > > I would like to know is there any way I can search any data from > tables given some parameters: > S

Re: test cannot find assertContains

2011-03-13 Thread Kenneth Gonsalves
On Sat, 2011-03-12 at 00:12 -0800, Mike Ramirez wrote: > On Friday, March 11, 2011 11:37:38 pm Kenneth Gonsalves wrote: > > > and all is well. I think the dev docs need to be clearer on this > point > > and mention this at the outset. After all they *are* dev docs. > > http://docs.djangoproject.c

Re: test cannot find assertContains

2011-03-13 Thread Mike Ramirez
On Sunday, March 13, 2011 09:58:18 pm Kenneth Gonsalves wrote: > On Sat, 2011-03-12 at 00:12 -0800, Mike Ramirez wrote: > > On Friday, March 11, 2011 11:37:38 pm Kenneth Gonsalves wrote: > > > and all is well. I think the dev docs need to be clearer on this > > > > point > > > > > and mention thi

Re: test cannot find assertContains

2011-03-13 Thread Kenneth Gonsalves
On Sun, 2011-03-13 at 22:40 -0700, Mike Ramirez wrote: > > I know it is there - but it is half way down the page. My point is > that > > it should be at the top of the page. For what it's worth I filed a > > ticket. > > I've een wondering about this myself, but I'm not sure that it's in > the wron

Re: test cannot find assertContains

2011-03-13 Thread Mike Ramirez
On Sunday, March 13, 2011 10:40:51 pm you wrote: > With this all in mind, I think they do enough to say use 'django.testing', > without having it specifically marked at the start. > > But it could possibly benefit from being two pages, one an "overview" and > one page for "django.testing" > > >

Re: file upload size problem

2011-03-13 Thread vamsy krishna
Oh yes. Thanks Karen. On Mar 12, 7:06 pm, Karen Tracey wrote: > On Sat, Mar 12, 2011 at 12:06 AM, vamsy krishna wrote: > > > I'm doing a file upload from one of my forms and writing the content > > to a temp file on the server. The problem is any file of size more > > than 250 KB is throwing the

Re: test cannot find assertContains

2011-03-13 Thread Mike Ramirez
On Sunday, March 13, 2011 10:58:10 pm Kenneth Gonsalves wrote: > On Sun, 2011-03-13 at 22:40 -0700, Mike Ramirez wrote: > > > I know it is there - but it is half way down the page. My point is > > > > that > > > > > it should be at the top of the page. For what it's worth I filed a > > > ticket.