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

2008-09-13 Thread Nathan Dabney
t; {{{ > 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: > > {{{ > month=previous_month|date:"b"|l

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 month

Re: Help with Date Based Generic Views and Permalink

2008-09-08 Thread Daniel Roseman
? > > Also, is there a workaround for using multiple date based generic > views and having them with different models? Say for a news one and > then for an events one? You probably won't get the reverse lookup to work on a generic view without giving it a specific name in the URLc

Help with Date Based Generic Views and Permalink

2008-09-08 Thread mccomas . chris
Hey all, I have this code: http://dpaste.com/76671/ When I go to the URL it doesn't display the page, but it also doesn't display and errors with the URL. What is wrong with the permalink instance? Also, is there a workaround for using multiple date based generic views and having

Re: Using subclass of RequestContext in generic views?

2008-09-02 Thread Tim Chase
ive information (by forgetting a filter). I'd also like to have it as DRY as possible, so developers don't have to remember to put redaction in everywhere, even if it's just one per URL entry. It can't readily go in the URLs.py because it needs the request info to know whe

Re: Using subclass of RequestContext in generic views?

2008-09-02 Thread Chris Emerson
Hi Tim, On Mon, Sep 01, 2008 at 10:04:36AM -0500, Tim Chase wrote: > My subclassed RequestContext object plans to intercept the > Context.__getitem__ call (wherein redaction will hopefully happen > in my custom subclass), and thus needs to be the actual object, > not just a dict-like object me

Re: Using subclass of RequestContext in generic views?

2008-09-01 Thread Tim Chase
>> I've been trying to figure out how to use a custom subclased >> RequestContext[1] object in my generic views. Looking at the >> code of django/views/generic/*.py it looks like this class is >> hard-coded in each of the views. >> >> Ideally, I'd

Re: Using subclass of RequestContext in generic views?

2008-09-01 Thread Benjamin Buch
Hi Tim, > I've been trying to figure out how to use a custom subclased > RequestContext[1] object in my generic views. Looking at the > code of django/views/generic/*.py it looks like this class is > hard-coded in each of the views. > > > Ideally, I'd be able to s

Using subclass of RequestContext in generic views?

2008-09-01 Thread Tim Chase
I've been trying to figure out how to use a custom subclased RequestContext[1] object in my generic views. Looking at the code of django/views/generic/*.py it looks like this class is hard-coded in each of the views. Ideally, I'd be able to set something in the settings.py to

Re: urlpatterns and generic views cheatsheet

2008-08-28 Thread Álvaro J. Iradier
wnload the original PDF. > > -I > > On Aug 25, 5:50 pm, Tim Chase <[EMAIL PROTECTED]> wrote: >> > Here is a summary of all the tutorials and docs that I have >> > read on urlpatterns and generic views. It is a 2 page, >> > concise, example code based cheat

Re: urlpatterns and generic views cheatsheet

2008-08-26 Thread DavidY
if you guys want the source here it is: although if you just had emailed me to my mail account i might have read this :p i used pdf because it's sexy and colorful as opposed to the following. from django.conf.urls.defaults import * urlpatterns = patterns('', # (regular exp, function, op

Re: urlpatterns and generic views cheatsheet

2008-08-25 Thread maeck
I have printed this from scribd into a PDF and use it as such, no need for login. Works somewhat, cannot select the text from it (could have run some text recognition on it), but expect to find the original code or pdf somewhere soon (Google code maybe). maeck --~--~-~--~~

Create/update/delete generic views and user

2008-08-25 Thread mccomas . chris
Is is possible with Create/update/delete generic views to get the user that's logged in's ID and use? I have a field with a FK for user, I'd really just like to use the generic views for this, since it's a simple thrown together internal site, instead of writing out other

Re: urlpatterns and generic views cheatsheet

2008-08-25 Thread rex
Tim Chase <[EMAIL PROTECTED]> [2008-08-25 08:43]: > >> It's not terribly obvious from the scribd layout, but at the >> top (above the document) there's a "download" link or similar, >> and there you can download the original PDF. > >...which expects that I create login... Copy & paste doesn't wor

Re: urlpatterns and generic views cheatsheet

2008-08-25 Thread Tim Chase
> It's not terribly obvious from the scribd layout, but at the > top (above the document) there's a "download" link or similar, > and there you can download the original PDF. ...which expects that I create login... Given that the source is likely just a PDF, posting a link to it somewhere is a

Re: urlpatterns and generic views cheatsheet

2008-08-25 Thread Idan Gazit
ll the tutorials and docs that I have > > read on urlpatterns and generic views. It is a 2 page, > > concise, example code based cheat sheet. > > >http://www.scribd.com/doc/4975790/urlpatterns-for-django-cheatsheet > > Nifty, but scribd is annoying as heck.  Printing from

Re: urlpatterns and generic views cheatsheet

2008-08-25 Thread Tim Chase
> Here is a summary of all the tutorials and docs that I have > read on urlpatterns and generic views. It is a 2 page, > concise, example code based cheat sheet. > > http://www.scribd.com/doc/4975790/urlpatterns-for-django-cheatsheet Nifty, but scribd is annoying as heck. Print

Re: Problem with generic views in tutorial example

2008-08-24 Thread Rodney Topor
.py in the reverse order: (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/(.*)', admin.site.root), Now I can have a public and admin interface, whether or not I use a separate admin.py file. Sorry to have bothered you. It seems generic vi

Re: urlpatterns and generic views cheatsheet

2008-08-24 Thread Idan
Useful! Thank you. :) -I On Aug 23, 3:11 pm, DavidY <[EMAIL PROTECTED]> wrote: > Here is a summary of all the tutorials and docs that I have read on > urlpatterns and generic views. It is a 2 page, concise, example code > based cheat sheet. > > http://www.scribd.com/doc/49

urlpatterns and generic views cheatsheet

2008-08-23 Thread DavidY
Here is a summary of all the tutorials and docs that I have read on urlpatterns and generic views. It is a 2 page, concise, example code based cheat sheet. http://www.scribd.com/doc/4975790/urlpatterns-for-django-cheatsheet --~--~-~--~~~---~--~~ You received this

Re: Problem with generic views in tutorial example

2008-08-23 Thread Anurag Goel
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.py, no get_absolute_url(

Re: Problem with generic views in tutorial example

2008-08-23 Thread Anurag Goel
) --end mysite/urls.py-- Again, no need for any additional changes. On Aug 22, 1: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 >

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 d

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 somet

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 m

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 a

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
Ivan Sagalaev wrote: > fabio natali wrote: > > For the sake of clarity, my django project is named arteak, the models > > we are using belong to an app called "management". > > Ah! Then there should of course be get_model('management', > kwargs.pop('model')). I thought 'arteak' was the name of t

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread Ivan Sagalaev
fabio natali wrote: > For the sake of clarity, my django project is named arteak, the models > we are using belong to an app called "management". Ah! Then there should of course be get_model('management', kwargs.pop('model')). I thought 'arteak' was the name of the app. This is why it returns N

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
Dear Ivan, it sounds like we are closer to the solution, still not got it though. Ivan Sagalaev wrote: [...] > > http://dpaste.com/72639/ > > Oy! I've found it :-). It has nothing to do with model_view decorator or > anything that we're talking here about. It's in urls.py, on line 30: > >

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread Ivan Sagalaev
fabio natali wrote: > That's right! So here comes my current urls.py: > > http://dpaste.com/72638/ > > then the traceback I get at http://localhost:8000/: > > http://dpaste.com/72639/ Oy! I've found it :-). It has nothing to do with model_view decorator or anything that we're talking here abo

Re: Generic views list_detail

2008-08-20 Thread [EMAIL PROTECTED]
Thanks for the help Daniel. I think I'm making some progress now :-) --~--~-~--~~~---~--~~ 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 unsubsc

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
Hi Ivan! Ivan Sagalaev wrote: [...] > fabio natali wrote: > > I added the line > > > > import arteak.management.models > > It's not the same thing :-). This line won't load the name "models" into > your local environment. If you want import from some path this should be: > > from a

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread Ivan Sagalaev
py could be easier. I'd probably better to > write a short bash script to generate a urls.py file from my models.py > with all the proper generic views entries for each model. Well... The choice is yours. However I'd suggest to spend some time

Re: Generic Views and ModelAdmin: too much code?

2008-08-20 Thread fabio natali
ct is not callable when accessing http://localhost:8000/ (that is the main page). Here comes my current urls.py: http://dpaste.com/72623/ Anyway I don't want to steal your time any longer. I really hoped saving some lines in urls.py could be easier. I'd probably better to write a short b

Re: Generic Views and ModelAdmin: too much code?

2008-08-19 Thread Ivan Sagalaev
fabio natali wrote: > This is the urls.py I created: http://dpaste.com/72138/ > It doesn't work though: I get a > KeyError at /manufacturer > u'manufacturer' > when accessing http://localhost:8000/manufacturer > (manufacturer being one of my model) KeyError says that it can't find a key 'manufact

Re: Generic views list_detail

2008-08-19 Thread Daniel Roseman
On Aug 19, 11:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Daniel, > > I am working my way > throughhttp://www.djangoproject.com/documentation/db-api/#related-objects > at the moment trying to get a better grasp on how django handles SQL > relationships. > > The way I got the above cod

Re: Generic views list_detail

2008-08-19 Thread [EMAIL PROTECTED]
Found the solution to: {% for taskUpdate in object.taskUpdate_set.all %} {{ taskUpdate.comment }} {% endfor %} Djando lowercases model names when used in templates. But still I had to call it object.taskupdate_set.all and not task.taskupdate.set_all --~--~-~--~~~-

Re: Generic views list_detail

2008-08-19 Thread [EMAIL PROTECTED]
Daniel, I am working my way through http://www.djangoproject.com/documentation/db-api/#related-objects at the moment trying to get a better grasp on how django handles SQL relationships. The way I got the above code to work was (following your suggestion): {% for task in object.task_set.all %}

Re: Generic views list_detail

2008-08-19 Thread Daniel Roseman
On Aug 19, 9:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Daniel, > > Thank you for your reply. > > Following your advice I tried the following: > > task is the model that relates to project. > > > {% for task in project.task.all %} > {{ task.title }} > {% endfor %} > > > It doesn't s

Re: Generic views list_detail

2008-08-19 Thread [EMAIL PROTECTED]
My mistake, I must have made a typo as it is now working perfectly. Thanks Daniel! --~--~-~--~~~---~--~~ 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.

Re: Generic views list_detail

2008-08-19 Thread [EMAIL PROTECTED]
Daniel, Thank you for your reply. Following your advice I tried the following: task is the model that relates to project. {% for task in project.task.all %} {{ task.title }} {% endfor %} It doesn't show anything so I think I'm confusing my models. Am I missing something obvious ? I am only

Re: Generic views list_detail

2008-08-19 Thread Daniel Roseman
On Aug 19, 7:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > My urls.py looks like this: > > project_info = { >     "queryset" : project.objects.all(), > > } > > (r'^project/(?P[-\w]+)/', > login_required(list_detail.object_detail), dict(project_info, > slug_field='slug')), > > Projects ha

Generic views list_detail

2008-08-19 Thread [EMAIL PROTECTED]
My urls.py looks like this: project_info = { "queryset" : project.objects.all(), } (r'^project/(?P[-\w]+)/', login_required(list_detail.object_detail), dict(project_info, slug_field='slug')), Projects have a one to many relationship with tasks. The objective of my using object_detail is to

Re: Generic Views and ModelAdmin: too much code?

2008-08-18 Thread fabio natali
Dear Ivan, your help is priceless, thanks! Ivan Sagalaev wrote: [...] > In models.py you can get rid of repeating "Manufacturer" two extra times > by doing: > > class Manufacturer(models.Model): > name = models.CharField(max_length=30) > address = models.CharField(max_len

Re: extension of generic views...

2008-07-11 Thread Rajesh Dhawan
On Jul 10, 5:41 pm, [EMAIL PROTECTED] wrote: > what's the best way with django to remember a page and redirect to > that page. > > so if you're atwww.mysite.com/entries/2008/jul/04/this-is-my-entry > and you click a link that stores something in a different db field > that once it goes through tha

extension of generic views...

2008-07-10 Thread mccomas . chris
what's the best way with django to remember a page and redirect to that page. so if you're at www.mysite.com/entries/2008/jul/04/this-is-my-entry and you click a link that stores something in a different db field that once it goes through that view and enters the info it redirects you to the url

Re: permalink with multiple generic views

2008-07-07 Thread mccomas . chris
thanks! On Jul 7, 9:32 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-07-07 at 06:28 -0700, [EMAIL PROTECTED] wrote: > > i found a post from a while back that basically said if you're using > > the same generic view type with two different urls you couldn't use > > the permalink

Re: permalink with multiple generic views

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 06:28 -0700, [EMAIL PROTECTED] wrote: > i found a post from a while back that basically said if you're using > the same generic view type with two different urls you couldn't use > the permalink decorator, is that still the case with the SVN release? > > we have our normal

permalink with multiple generic views

2008-07-07 Thread mccomas . chris
i found a post from a while back that basically said if you're using the same generic view type with two different urls you couldn't use the permalink decorator, is that still the case with the SVN release? we have our normal news table for the school's news, but we also have students blogging an

Re: Using a Custom Manager for date based generic views??

2008-07-06 Thread Rob Hudson
On Jul 6, 3:53 pm, Christopher Clarke <[EMAIL PROTECTED]> wrote: > class IssuerManaager(models.Manager): > >      def with_aggs(self): >          from django.db import connection >          cursor=connection.cursor() >          cursor.execute(""" >              select i.id,max(i.name), m.dateix AS

Re: Using a Custom Manager for date based generic views??

2008-07-06 Thread Milan Andric
On Sun, Jul 6, 2008 at 5:53 PM, Christopher Clarke <[EMAIL PROTECTED]> wrote: > Hi Guys > I'm building a django based system for a company that monitors the mutuals > funds industry > We have Mutual Funds Companies (Issuer) who have one or more funds (Fund) > and every month the funds submit a vo

Using a Custom Manager for date based generic views??

2008-07-06 Thread Christopher Clarke
Hi Guys I'm building a django based system for a company that monitors the mutuals funds industry We have Mutual Funds Companies (Issuer) who have one or more funds (Fund) and every month the funds submit a volume report Here is a simplified version class Issuer(models

Re: Is it possible not to use RequestContext in Generic Views?

2008-06-24 Thread pength
:06 am, pength <[EMAIL PROTECTED]> wrote: > As Generic Views are using RequestContext by default, in most cases > it's quite good. But I have some special generic views, which will > populate the result via Ajax, so, to make it more effecient, I don't > want the views to us

Is it possible not to use RequestContext in Generic Views?

2008-06-24 Thread pength
As Generic Views are using RequestContext by default, in most cases it's quite good. But I have some special generic views, which will populate the result via Ajax, so, to make it more effecient, I don't want the views to use RequestContext. but how to "disable" RequestCont

generic views

2008-06-05 Thread pihentagy
Hi all! As I can see in the docs, django.views.generic.create_update.delete_object needs a post_delete_redirect parameter. Isn't it possible to redirect to the referrer, if the parameter is not given? It would make sense IMHO. The other thing, that annoys me, that I cannot easily check permissi

Re: Generic views and user's objects

2008-04-21 Thread picky
No idea ? Can't I use generic view in this case ? :-/ On 18 avr, 00:11, picky <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to usegenericview in my app and I have some problems with > objects related to the logged user. > > Here is a simplified version of my models : > > class Animal(models.

Generic views and user's objects

2008-04-17 Thread picky
Hi, I'm trying to use generic view in my app and I have some problems with objects related to the logged user. Here is a simplified version of my models : class Animal(models.Model): owner = models.ForeignKey(User) gender = models.CharField(max_length=1, choices=GENDERS) mother = mo

Caching generic views

2008-04-12 Thread Julien
Hi there, I've been able to cache some views individually using the cache_page decorator, for example: @cache_page(60 * 15) def frontpage(request): blabla... But now I'd like to cahe some generic views that I'm using. Here are the url patterns: urlpatt

Re: Generic views and update

2008-04-09 Thread picky
o and I'm looking how to use generic views. > > I see there is a generic view to update an object. I use it perfectly. > Now, I would like to know if it is possible to use it to update only > some field of an object without display an HTML field for each model > field. Actually

Generic views and update

2008-04-09 Thread picky
Hi, I'm new to django and I'm looking how to use generic views. I see there is a generic view to update an object. I use it perfectly. Now, I would like to know if it is possible to use it to update only some field of an object without display an HTML field for each model field. A

Re: Multi user application using admin and generic views

2008-04-07 Thread Sebastjan Trepca
http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests On 4/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I 'm developing a web application for multi-user. Because of power of > admin interface and generic views

Multi user application using admin and generic views

2008-04-07 Thread meledictas
Hi, I 'm developing a web application for multi-user. Because of power of admin interface and generic views, I 'd like to use them as much as possible. For multiple user application, specific views seem to be need, especially permission checking. Are there any example application

Re: generic views - newforms

2008-03-30 Thread sector119
When you will read Michael's links on documentation you can use generic views on newforms: http://217.196.165.10/create_update.txt They have create and update preview support also, just use preview=True option. And object_delete can use id's like '1/2/3/4/5/10/128' to us

Re: generic views - newforms

2008-03-30 Thread Michael
They are two very different animals really. Generic views work as a way to cut code from your views code (the code that creates the httpresponse, between the url handling and the template rendering). Newforms is the way that Django creates and handles forms. You will generally need to use a new

generic views - newforms

2008-03-30 Thread Victor Quiroz
Hello, what is the difference (advantage) to use generic views or newforms Victor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Purpose of Complex Generic Views

2008-03-28 Thread bob
Thanks for pointing that out. I just browsed to the object_list() source, and it's nice to see a lot of the pagination stuffs abstracted out, it indeed helped me to appreciate it more. :) On Mar 28, 4:50 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 6:40 PM, bob <[EMAI

Re: Purpose of Complex Generic Views

2008-03-28 Thread James Bennett
On Fri, Mar 28, 2008 at 6:40 PM, bob <[EMAIL PROTECTED]> wrote: > in some examples that require extra work, we have to define a wrapper > function. What's confusing me is how is this different from just > defining regular views? I can't quite notice much reduction in code, > nor improvements

Purpose of Complex Generic Views

2008-03-28 Thread bob
Hi, I'm a newbie to Django. I've just read the reference doc and Django Book chapter on generic view, but I'm still a bit confused as to when to justify the use of generic views. This is just out of curiosity, as I'm sure there are aspects I've overlooked. My unde

Re: extra arguments in generic views

2008-03-27 Thread Erik Vorhes
el <[EMAIL PROTECTED]> wrote: > > I guess I didn't explain myself well enough. > > 90% of the views on my site don't need anything special being passed > to a wrapper view function or anything. In my "info_dict" I typically > define only the items that s

Re: extra arguments in generic views

2008-03-27 Thread Michael
I guess I didn't explain myself well enough. 90% of the views on my site don't need anything special being passed to a wrapper view function or anything. In my "info_dict" I typically define only the items that stretch across the generic views of the entire model, ty

Re: extra arguments in generic views

2008-03-27 Thread Erik Vorhes
This should help: http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-generic-views/ Say you've got this in "yourproj.yourapp.views" (assuming there's a ForeignKey on Thing2): from django.views.generic import date_based from yourproj.yourapp.model

extra arguments in generic views

2008-03-27 Thread Michael Newman
I was just messing around with my sites urlconf to keep it organized and manage clean things up a bit. I make use of generic views quite a bit and they really save me a lot of time. One of the things that I noticed however as I was trying to combine a lot of "info_dicts" was that t

Re: Generic Views: Variable Table Columns

2008-03-07 Thread Justin Fagnani
want to display fields form a related object. I coded this into my generic templates at first, with various custom filters like lookup, isin, stringsub, etc., but I now think that's template abuse :) I do wonder what newforms generic views and templates will bring, but I haven't stayed up on t

Re: Generic Views: Variable Table Columns

2008-03-05 Thread Darryl Ross
Just to follow up for the archives. What I was after is a getattr filter for the templates. Searching djangosnippets.org has found a couple. This one seems to do what I need: http://www.djangosnippets.org/snippets/411/ Regards Darryl Darryl Ross wrote: Hey All, I'm using the ge

Generic Views: Variable Table Columns

2008-03-03 Thread Darryl Ross
Hey All, I'm using the generic views and trying to build a HTML table where both the rows and columns are generated dynamically. Simplified example follows. I am having a problem though in that I can't work out if it is possible to reference an attribute of a model using a templat

Re: FloatField Size on Generic Views

2008-02-13 Thread Malcolm Tredinnick
On Wed, 2008-02-13 at 10:35 -0800, [EMAIL PROTECTED] wrote: > Is there a way to set the "size" attribute of FloatFields in Generic > Views? Currently they're pretty big, and it seems like max_digits was > deprecated in FloatFields with the arrival of DecimalFields. You&#

FloatField Size on Generic Views

2008-02-13 Thread [EMAIL PROTECTED]
Is there a way to set the "size" attribute of FloatFields in Generic Views? Currently they're pretty big, and it seems like max_digits was deprecated in FloatFields with the arrival of DecimalFields. --~--~-~--~~~---~--~~ You received this message

Re: generic views

2008-02-05 Thread LMZ
0 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > > > > You must specify details in pattern > > > > definitianhttp://www.djangoproject.com/documentation/generic_views/ > > > > > On 14 янв, 20:08, Chris <[EMAIL PROTECTED]> wrote: > > >

Re: generic views

2008-01-14 Thread Chris
to a dictionary for the generic view > > > > to use but I keep getting an error that the variable is not defined. > > > > Its obvious that the variable is not defined yet but is there a way > > > > that I can make this work? Here is an example that I have. Worst case

Re: generic views

2008-01-14 Thread Alex Koshelev
the generic view > > > to use but I keep getting an error that the variable is not defined. > > > Its obvious that the variable is not defined yet but is there a way > > > that I can make this work? Here is an example that I have. Worst case > > > scenario is th

Re: generic views

2008-01-14 Thread Christos Τrochalakis
use but I keep getting an error that the variable is not defined. > > > Its obvious that the variable is not defined yet but is there a way > > > that I can make this work? Here is an example that I have. Worst case > > > scenario is that I create my own view whic

Re: generic views

2008-01-14 Thread Chris
an make this work? Here is an example that I have. Worst case > > scenario is that I create my own view which I already have but I like > > to use what is already provided. Anyone have a work around to my > > generic views problem? > > > Here is the code:http://dpaste.c

Re: generic views

2008-01-14 Thread Alex Koshelev
have but I like > to use what is already provided. Anyone have a work around to my > generic views problem? > > Here is the code:http://dpaste.com/31029/ > > Thanks ahead of time. --~--~-~--~~~---~--~~ You received this message because you are subs

generic views

2008-01-14 Thread Chris
work? Here is an example that I have. Worst case scenario is that I create my own view which I already have but I like to use what is already provided. Anyone have a work around to my generic views problem? Here is the code: http://dpaste.com/31029/ Thanks ahead of time

Re: QuerySet in generic views is cached with others Managers

2008-01-08 Thread Guilherme M. Gondim (semente)
On Jan 8, 11:29 pm, "Guilherme M. Gondim (semente)" <[EMAIL PROTECTED]> wrote: > In generic views, my queryset is cached and I need restart my > application for get new itens. It is a bug? With default objects > manager, I don't have this problem. Hi, I found the pr

QuerySet in generic views is cached with others Managers

2008-01-08 Thread Guilherme M. Gondim (semente)
info_dict = { 'queryset': Entry.published_on_site.all(), } In generic views, my queryset is cached and I need restart my application for get new itens. It is a bug? With default objects manager, I don't have this problem. Thanks, semente --~--~-~--~~~

Re: using filter on the queryset of generic views.

2008-01-08 Thread Alex Koshelev
There is no way to do it in urls.py. But you may write wrapper view that will filter queryset and then pass it to generic view. On 9 янв, 01:19, "Shishir Ramam" <[EMAIL PROTECTED]> wrote: > I'd like to pass a parameter from a url to a query set of a generic view. > > Something like the following.

using filter on the queryset of generic views.

2008-01-08 Thread Shishir Ramam
I'd like to pass a parameter from a url to a query set of a generic view. Something like the following. I'm not sure if this is possible, but would appreciate any tips on how this can be accomplished. thanks, -shishir my_info_dict = { 'queryset': my_model.objects.filter(field_name=field_value

Re: How do generic views determine for field sizes?

2007-12-30 Thread Jeff Anderson
I believe an override with css is the best option here. size=30 is probably the standard for a form field representing CharField. You could open a ticket with a feature request to change the default behavior. Cheers! Jeff Anderson Steve Bergman wrote: > I have a model with several fields, one of

How do generic views determine for field sizes?

2007-12-27 Thread Steve Bergman
I have a model with several fields, one of which is defined like this: mi = CharField(max_length=1, blank=True) When I use it in a generic create_update form, it sets the size=30 and maxlength=1. This seems odd to me. I can override it with CSS. But why does it make the field so large in the

Re: RequestContext in Generic Views?

2007-12-17 Thread gtaylor
Sorry for the spam, looks like I can just grab the messages via {{request.messages}} from within the templates. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: RequestContext in Generic Views?

2007-12-17 Thread gtaylor
I know this has been asked a few times and the answer seems to be that this is already included in generic views by default, but it's just not showing anything in my {{messages}} variable on all of my generic views. If i send messages and go to a regular page that's ren

RequestContext in Generic Views?

2007-12-17 Thread gtaylor
Hello, I'm fairly certain this is a really easy thing I'm just not understanding. I have some generic views that I want to pass a RequestContext(request) object, but I'm not exactly sure how to do so. I've been passing a RequestContext to all of my other pages using render_

Re: Consistency between Django syndication framework & generic views (at least)

2007-11-27 Thread [EMAIL PROTECTED]
Up, unless I need to move it to django-dev list ? On 20 nov, 14:30, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > After reading and viewing the screencast on syndication framework [1], > I let a comment on the site where the "obj" comes from ? > > Michael points me to the right url

Re: generic views and form templates

2007-11-21 Thread Martin
hi, michael thanks for the help.. i've tried this but it still doesn't work. i'm doing something wrong, but i don't know what. if i remove save(), object still gets created, just without slug. my question here is: does slug field needs to have blank=True? when that is set, object gets created, wi

Re: generic views and form templates

2007-11-21 Thread Michael
Hi Martin, On Nov 22, 7:59 am, Martin <[EMAIL PROTECTED]> wrote: > i wrote this at the end of my model (for which, slug must be created > after user creates it): > > def save(self): > if not self.id: > self.slug = title.slugify() > super(Kom

Re: generic views and form templates

2007-11-21 Thread Martin
btw, after this change, object gets created, but the slug field is empty.. so i can't view the object, because of (r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(? P[-\w]+)/$',object_detail, dict(komentar_date_dict, slug_field='slug')) thanks, martin --~--~-~--~~~---

Re: generic views and form templates

2007-11-21 Thread Martin
Thanks a lot, guys! i'm pretty new to django and i really didn't want to use newforms in my app. but RajeshD's idea is pretty cool. it just seems that i don't know how to use slugify().. if you have just a little more time, please help me for a minute: i wrote this at the end of my model (for w

Re: generic views and form templates

2007-11-21 Thread Michael
Hi Martin, Looking at your url conf above, I'm thinking that you're not currently using a form for your templates? I'd create a form (newform) for your model and then use this to ensure that entry of the slug field is not required [1] by the user when creating a post, and then update your form's

Re: generic views and form templates

2007-11-21 Thread RajeshD
> that work ok, when a user want to create an entry it opens > komentar_form.html and it's displayed right. but when user clicks > submit, it always returns a error for slug field. since user doesn't > write slug field (should be prepopulated, right?), No. That only happens in the admin and even

<    1   2   3   4   5   6   7   8   >