Re: Problem with generic views

2009-06-26 Thread Justin Lilly
Actually, As he didn't provide a template_object_name parameter, the generic view's default context variable is object_list. -justin On Fri, Jun 26, 2009 at 8:18 PM, maplye wrote: > > task_list not Task.object.all in the view. > > 2009/6/27 Technicalbard : >> >> Hey all, >> >> I did the tutoria

Re: Problem with generic views

2009-06-26 Thread maplye
task_list not Task.object.all in the view. 2009/6/27 Technicalbard : > > Hey all, > > I did the tutorial, yet when I try to apply what I've learned (or > think I've learned), to my own application it doesn't work... > > My code looks like this: > > # taskmgr/models.py > class Task(models.Model):

Problem with generic views

2009-06-26 Thread Technicalbard
Hey all, I did the tutorial, yet when I try to apply what I've learned (or think I've learned), to my own application it doesn't work... My code looks like this: # taskmgr/models.py class Task(models.Model): name = models.CharField(max_length=216) summary = models.CharField(max_length=3

Re: problem with generic views (monthly archive) and different languages

2008-09-13 Thread Nathan Dabney
URL keyed off of numeric month instead of localized name. -Nathan On Sat, Sep 13, 2008 at 6:02 AM, Julian <[EMAIL PROTECTED]> wrote: > > hi there, > > in my settings.py there is the language specified as "de_de", wich > works well with things like: > > {{{ > blog_entry.timestamp|date:"b" > }}} >

problem with generic views (monthly archive) and different languages

2008-09-13 Thread Julian
hi there, in my settings.py there is the language specified as "de_de", wich works well with things like: {{{ blog_entry.timestamp|date:"b" }}} in may, it returns "Mai", wich is german for may. but i am using the generic views for my blog archive, and monthly based i'm doing things like: {{{

Re: Problem with generic views in tutorial example

2008-08-24 Thread Rodney Topor
> Anurag, Thanks.  That worked for me too.  But it's hardly a solution. > Now I can't use admin.  I want both.  Is that asking too much?  Has > anyone else any ideas? OK, I've solved all my problems. It was my mistake. For some reason, I had these two lines in urls.py in the reverse order:

Re: Problem with generic views in tutorial example

2008-08-23 Thread Anurag Goel
And in my first reply, I meant 'mysite/polls/urls.py' when I said: ' . I did however, do something that the tutorial did not ask to do - i.e. delete all references to the admin in mysite/urls.py, which looks like this ' On Aug 22, 1:38 am, Rodney Topor <[EMAIL PROTECTED]> wrote: > On Aug

Re: Problem with generic views in tutorial example

2008-08-23 Thread Anurag Goel
Apologies - I did not mention that my original urls.py (under mysite/, at the same level as polls/) still exists (the urls.py has to be copied over as opposed to moved), and it contains the following code: --mysite/urls.py begin-- from django.conf.urls.defaults import * # Uncomment the n

Re: Problem with generic views in tutorial example

2008-08-22 Thread Karen Tracey
On Fri, Aug 22, 2008 at 4:38 AM, Rodney Topor <[EMAIL PROTECTED]> wrote: > > On Aug 22, 4:18 pm, Anurag Goel <[EMAIL PROTECTED]> wrote: > > I was able to implement the generic views change with yesterday's > > trunk version successfully. I did not have to do anything special (no > > separate admin

Re: Problem with generic views in tutorial example

2008-08-22 Thread Rodney Topor
On Aug 22, 4:18 pm, Anurag Goel <[EMAIL PROTECTED]> wrote: > I was able to implement the generic views change with yesterday's > trunk version successfully. I did not have to do anything special (no > separate admin.py, no get_absolute_url()) > > I did however, do something that the tutorial did n

Re: Problem with generic views in tutorial example

2008-08-21 Thread Anurag Goel
I was able to implement the generic views change with yesterday's trunk version successfully. I did not have to do anything special (no separate admin.py, no get_absolute_url()) I did however, do something that the tutorial did not ask to do - i.e. delete all references to the admin in mysite/url

Problem with generic views in tutorial example

2008-08-21 Thread Rodney Topor
I'm having trouble modifying the tutorial example to use generic views. (My implementation without generic views works fine.) I've registered the class Poll with admin in a separate admin.py module as described in ticket 8181. I've provided names for all url patterns in app polls. I've defined

Re: Problem with generic views (404)

2007-09-16 Thread James Bennett
On 9/16/07, Florian Lindner <[EMAIL PROTECTED]> wrote: > {% if Abbreviation_list %} Read the generic views documentation carefully; the default variable name the view will give you is "object_list". -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---

Re: Problem with generic views (404)

2007-09-16 Thread Florian Lindner
Am Sonntag, 16. September 2007 schrieb Collin Grady: > Do you actually have any Abbreviation objects? > > If you don't tell the view to allow empty results, it'll 404 if it has > nothing to show :) Yes, this was the problem, thanks! However I ran into the next problem just 5 minutes later. I ha

Re: Problem with generic views (404)

2007-09-15 Thread Collin Grady
Do you actually have any Abbreviation objects? If you don't tell the view to allow empty results, it'll 404 if it has nothing to show :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Problem with generic views (404)

2007-09-15 Thread Florian Lindner
Hello, I have an problem using generic views. My settings.py has set: TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', ) TEMPLATE_DIRS = ("/home/florian/xgm/templates/", ) I have an app AbbrD