Re: Retrieving 'attributes' of a product for generic views

2007-05-08 Thread James Bennett
On 5/8/07, Adam <[EMAIL PROTECTED]> wrote: > keeping logic out of templates. I'm fine with that, so my next > thought was to build a dictionary of every attribute of a product and > reference that, but {{ object.attributes["brightness"] }} gets me a > "Could not parse the remainder" error. Remem

Re: Retrieving 'attributes' of a product for generic views

2007-05-08 Thread Chris Moffitt
> > I've got an ecommerce system I'm working on. I have a product model, I'm not sure if I can answer this specific question but you might want to check out Satchmo - http://www.satchmoproject.com It is an eCommerce solution written in Django - at least take a look and see if it meets your need

Retrieving 'attributes' of a product for generic views

2007-05-08 Thread Adam
I've got an ecommerce system I'm working on. I have a product model, and a productattribute model tied to each product for flexibility - such a wide variety of products can/will be sold that it wouldn't be possible or practical to put them all on the product model. Where this becomes a difficult

Re: "Complex" Views/Generic Views

2007-05-01 Thread Malcolm Tredinnick
in the generic view? Sort of. You can only pass it in as part of extra_context. You cannot pass it as the queryset argument, because it's no longer a queryset and the generic views actually use some queryset-specific methods on that argument. There is an open ticket in Trac (#3891) that propos

Re: "Complex" Views/Generic Views

2007-04-30 Thread Bryan Veloso
> In fact, that whole thread possibly has some relevance to your problem. > Note that the solution in the particular post I've highlighted works on > Python 2.3 and up, but if you are using 2.4 or later, Ned Batchelder's > post is of more than trivial relevance. So, (with my very limited python k

Re: "Complex" Views/Generic Views

2007-04-30 Thread Malcolm Tredinnick
On Tue, 2007-05-01 at 06:29 +, Bryan Veloso wrote: > > What you *can* do, if you're willing to be a bit adventurous, is pull > > out the content you want from the different models you want, and dump > > the results into one big list (a list doesn't care what types of > > objects it contains).

Re: "Complex" Views/Generic Views

2007-04-30 Thread Bryan Veloso
> What you *can* do, if you're willing to be a bit adventurous, is pull > out the content you want from the different models you want, and dump > the results into one big list (a list doesn't care what types of > objects it contains). Then you can take advantage of Python's > list-sorting faciliti

Re: "Complex" Views/Generic Views

2007-04-30 Thread James Bennett
On 4/30/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > I have a blog, and I have 3 post types, regular posts (Entry), > videocasts and tutorials. Now, I want to be able to have all of these > grouped in chronological order and then spit out to the user as such. > (Hopefully that makes sense). I'm g

"Complex" Views/Generic Views

2007-04-30 Thread Bryan Veloso
Just want to thank everybody for their help so far. :) The responses here are a lot faster than I had expected. Anyway, here's my next question. I have a blog, and I have 3 post types, regular posts (Entry), videocasts and tutorials. Now, I want to be able to have all of these grouped in chronolo

Re: User and generic views

2007-04-29 Thread Robin Percy
; > object automatically exposed to templates used with generic views? I > > > want to display a login link if no one is logged in and a logout link > > > if a user is. > > > > Providing you have the Authentication and Session middleware modules in > >

Re: User and generic views

2007-04-29 Thread Ryan K
On Apr 29, 4:26 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-04-29 at 03:47 +, Ryan K wrote: > > Hi all...quick question. If I have the auth app enabled, is the user > > object automatically exposed to templates used with generic views? I > > w

Re: User and generic views

2007-04-29 Thread Malcolm Tredinnick
On Sun, 2007-04-29 at 03:47 +, Ryan K wrote: > Hi all...quick question. If I have the auth app enabled, is the user > object automatically exposed to templates used with generic views? I > want to display a login link if no one is logged in and a logout link > if a user is. P

User and generic views

2007-04-28 Thread Ryan K
Hi all...quick question. If I have the auth app enabled, is the user object automatically exposed to templates used with generic views? I want to display a login link if no one is logged in and a logout link if a user is. Thanks, Ryan --~--~-~--~~~---~--~~ You

Re: url template tag with generic views?

2007-04-16 Thread ltbarcly
Nice, thanks for the help! On Apr 16, 2:09 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > On 4/16/07, ltbarcly <[EMAIL PROTECTED]> wrote: > > > > > Is it possible to use the {% url %} tag with generic views? Generic > > views get used more than once

Re: url template tag with generic views?

2007-04-16 Thread Jay Parlar
On 4/16/07, ltbarcly <[EMAIL PROTECTED]> wrote: > > Is it possible to use the {% url %} tag with generic views? Generic > views get used more than once in an app presumably, so there would > have to be some way to narrow it down. > > I'm guessing that there might

url template tag with generic views?

2007-04-16 Thread ltbarcly
Is it possible to use the {% url %} tag with generic views? Generic views get used more than once in an app presumably, so there would have to be some way to narrow it down. I'm guessing that there might not be a way to do it at this time, which is a

Re: request for generic views functionality...

2007-04-14 Thread watusee
e, body) and > > other fields unique to each model. I had initially thought to combine > > the three models into one mega-model, but didn't like the way it > > worked in the admin tool. I felt it would be too confusing to have > > optional fields for each type. > >

Re: request for generic views functionality...

2007-04-14 Thread Mike Axiak
blem with three models is that in practice I'm using them all > together, typically sorted by date. I want to use generic views to > show the list of news items as well as the detail view. Unfortunately > I cannot think of a way to combine the data from the three models in a > way to

request for generic views functionality...

2007-04-13 Thread watusee
odels into one mega-model, but didn't like the way it worked in the admin tool. I felt it would be too confusing to have optional fields for each type. The problem with three models is that in practice I'm using them all together, typically sorted by date. I want to use generic views to s

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Martin J Hsu
fit > you get for the complexity and slowdown is the ability to use > 'extra_context' instead of 'context_processor' in your generic view > declaration. I don't see this as benefit at all. The complexity of those 3 lines will allow certain users (those not ready

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Russell Keith-Magee
context processor. You can define and use a context processor for a single generic view; if you find you're using one particular context processor a lot, consider adding it to TEMPLATE_CONTEXT_PROCESSORS". It's easy to explain, and it provides a neat excuse for introducing the idea

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Martin J Hsu
google groups gobbled my response and I don't see it...sorry if this turns out to be a repost. On Apr 10, 12:26 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/10/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > > > > I saw this as a minor inconsistency in how settings are defaulted. >

Re: generic views 'extra_context' value via function call utility

2007-04-09 Thread Russell Keith-Magee
On 4/10/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > I saw this as a minor inconsistency in how settings are defaulted. > Not a big deal to me personally. Django was made by perfectionists > and I thought I'd point this out. Django-admin produces a default settings file that contains the most

Re: generic views 'extra_context' value via function call utility

2007-04-09 Thread Martin J Hsu
c[key] = value() +try: +c[key] = value(request) +except TypeError: +c[key] = value() else: c[key] = value if not template_name: I used this to extend the 'books' example from the djangobook.com book. I

Re: generic views 'extra_context' value via function call utility

2007-04-09 Thread Russell Keith-Magee
On 4/9/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > The a value (a callable) in the 'extra_context' dict passed to a > generic view (like django.views.generic.list_detail.object_list) can > be used to computed the value of a tag: > http://www.djangoproject.com/documentation/generic_views/#djang

generic views 'extra_context' value via function call utility

2007-04-08 Thread Martin J Hsu
I'm new to Django and have been trying to read up on generic views and sessions. I might be missing something, so please correct me as needed. The a value (a callable) in the 'extra_context' dict passed to a generic view (like django.views.generic.list_detail.object_list)

dilling down with generic views

2007-04-04 Thread Tim Tsai
I am learning Django and my first program is a drill-down type page similar to what I see at http://chicagocrime.org. I am using generic views and have run into confusion about how to handle a URL like this: http://www.chicagocrime.org/types/armed_violence/245/ I have two models

Re: Generic views. Really generic

2007-04-03 Thread [EMAIL PROTECTED]
.views.generic.list_detail.object_detail', dict(category_dict, > > slug_field='slug', template_name="category.html")), > >(r'^$', 'django.views.generic.list_detail.object_list', > > dict(queryset=Category.objects.all(), > > template_object_name="cat

Re: Generic views. Really generic

2007-04-02 Thread Malcolm Tredinnick
ic.list_detail.object_detail', dict(category_dict, > slug_field='slug', template_name="category.html")), >(r'^$', 'django.views.generic.list_detail.object_list', > dict(queryset=Category.objects.all(), > template_object_name="category", te

Generic views. Really generic

2007-04-02 Thread [EMAIL PROTECTED]
27;^$', 'django.views.generic.list_detail.object_list', dict(queryset=Category.objects.all(), template_object_name="category", template_name="base.html")), But for the detail view, I think I need something like // /item Can this be done in generic views

Re: Date field widget for generic views...

2007-03-31 Thread [EMAIL PROTECTED]
You'll need to include the javascript in your base.html template (or for the forms that need it) from the admin css/js site: If I recall, you'll need to use the proper class names in your template (class="vDateField" class="vTimeField" ) : Date: Time: --~--~-~--~~---

Date field widget for generic views...

2007-03-31 Thread mediumgrade
I am writing an app that makes heavy use of generic views. I have several forms which include date fields and I want to know how to attach a widget to the field for entering the date (like the one used in the admin site). Am I making sense

Date field widget for generic views...

2007-03-23 Thread mediumgrade
I am writing an app that makes heavy use of generic views. I have several forms which include date fields and I want to know how to attach a widget to the field for entering the date (like the one used in the admin site). Am I making sense

generic views

2007-03-22 Thread paulh
rom a user in a session and I would like to display this list with all the pagination etc that you get with generic views. Any ideas would be appreciated. Paul Hide --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

Date field wiget for generic views...

2007-03-21 Thread mediumgrade
I am writing an app that makes heavy use of generic views. I have several forms which include date fields and I want to know how to attach a widget to the field for entering the date (like the one used in the admin site). Am I making sense

Re: Permalink decorator and generic views, revisited

2007-03-13 Thread dchandek
> I *think* that so long as you don't have multiple URLs pointing at the > same generic view you'll be OK, but otherwise there could be issues -- > we're working on it. Thanks for the reply. This is exactly the problem. I want to use object_detail and object_list for multiple URLs, so I'll be int

Re: Permalink decorator and generic views, revisited

2007-03-12 Thread James Bennett
On 3/12/07, dchandek <[EMAIL PROTECTED]> wrote: > Am I missing something? It's not that 'permalink' doesn't work with generic views -- it can. As I understand it, the problem is a URLConf like this: urlpatterns = patterns('django.views.gener

Permalink decorator and generic views, revisited

2007-03-12 Thread dchandek
I posted previously about how it seemed to me that, while the permalink decorator is useful in decoupling the get_absolute_url() methods of an application's models from the site/project, it more or less forces you to create dummy custom views where you would normally simply use generic

Re: Permalink decorator and generic views

2007-03-09 Thread Malcolm Tredinnick
ute_url = permalink(get_absolute_url) > > but it seems to return the first reference to that generic view in the > URLconf. Thus, what would seem to be a common development pattern is > disturbed: defining URLs that point to detail views "directly" using > generic views.

Re: Permalink decorator and generic views

2007-03-09 Thread dchandek
s merely that, while permalink is useful, it can't just be plugged in when you're referencing generic views for detail views in your URLconf. --David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Permalink decorator and generic views

2007-03-08 Thread dchandek
he URLconf. Thus, what would seem to be a common development pattern is disturbed: defining URLs that point to detail views "directly" using generic views. Just a comment ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: how to user generic views (object_list) to show dynamic list ?

2007-03-03 Thread lee
thank you for your help! works well now :) 2007/3/3, Henrik Lied <[EMAIL PROTECTED]>: > > > Yeah, just pass an extra argument in the urls.py, like /files/(? > P[-\w]+), and filter your queryset. Take a look at > > http://www.b-list.org/weblog/2006/11/16/django-tips-ge

Re: how to user generic views (object_list) to show dynamic list ?

2007-03-02 Thread Henrik Lied
Yeah, just pass an extra argument in the urls.py, like /files/(? P[-\w]+), and filter your queryset. Take a look at http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-generic-views --~--~-~--~~~---~--~~ You received this message because you are

how to user generic views (object_list) to show dynamic list ?

2007-03-02 Thread lee
Hi I have a problem how to use generic views (object_list) to show dynamic list ? for exaple, my model is a movie with a category , I want to accomplish this : when I access http://.../action , in which action is a category name, then it display all the movie objects in the

Re: URL extra options placeholder syntax- or is it only for generic views?

2007-02-28 Thread Malcolm Tredinnick
On Tue, 2007-02-27 at 11:40 -0800, yary wrote: > http://www.djangoproject.com/documentation/generic_views/ has this > example: > > ... redirects from /foo// to /bar//: > > urlpatterns = patterns('django.views.generic.simple', > ('^foo/(?P\d+)/$', 'redirect_to', {'url': '/bar/%(id)s/'}), > )

URL extra options placeholder syntax- or is it only for generic views?

2007-02-27 Thread yary
http://www.djangoproject.com/documentation/generic_views/ has this example: ... redirects from /foo// to /bar//: urlpatterns = patterns('django.views.generic.simple', ('^foo/(?P\d+)/$', 'redirect_to', {'url': '/bar/%(id)s/'}), ) What replaces the '%(id)s' section, the generic view package,

generic views & limit_choices_to

2007-02-21 Thread Antonio
hi all, I'm trying to use django generic views for my models ... the problem is that I don't find the method to update a ForeingKey() field in a form: class Conferma(models.Model): fk_prev = models.ForeignKey(Previsione, verbose_name="previsione",

Re: Generic Views - problem with template missing

2007-01-30 Thread James Bennett
On 1/26/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > Though, not sure what "in the future" means. a matter of the date not > being the same in the db and the server or something? Care to explain? Well, let's take a simple example. Today is January 30; if you were to go hit a generic view, an

Re: Generic Views - problem with template missing

2007-01-29 Thread Honza Král
re to explain? the thing is that in the database you have a record that have pub_date set to some date in the future. Since the generic views are meant for archive/newspapers/blogs etc., they display only objects, that have already been published (publication date is in the past). You can overr

Re: Newforms and generic views

2007-01-29 Thread Mike
Hey Jacob, Thanks for your pointer regarding error highlighting--Igotsit. > Actually, though, there hasn't been anyone who's (so far) volunteered to work > on bring newforms into generic views. So, if that's something you'd like to > work on, we'd all love it

Re: Newforms and generic views

2007-01-29 Thread Mike
On Jan 29, 4:57 pm, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > On 1/29/07 3:28 PM, Mike wrote: > > > Can anyone share information regarding the current timeline and plans > > for newforms and integrating newforms with generic views?Generally we don't > >

Re: Newforms and generic views

2007-01-29 Thread Jacob Kaplan-Moss
On 1/29/07 3:57 PM, Jacob Kaplan-Moss wrote: > actually get paid full-time to work on Django[*], this is how it'll be. Dammit, I was gonna make a snarky joke about someone loaning me a million dollars for a Django endowment, and then I went and clicked "send" to early. /me grumbles... Jacob -

Re: Newforms and generic views

2007-01-29 Thread Jacob Kaplan-Moss
On 1/29/07 3:28 PM, Mike wrote: > Can anyone share information regarding the current timeline and plans > for newforms and integrating newforms with generic views? Generally we don't really put out "timelines" per-se. You see, we're all volunteers around here,

Newforms and generic views

2007-01-29 Thread Mike
Hi folks, Can anyone share information regarding the current timeline and plans for newforms and integrating newforms with generic views? I did look over the website and searched the archives of the dev group but didn't see a recent estimate. I'd gladly help out, but I'm

Re: Generic Views - problem with template missing

2007-01-26 Thread Panos Laganakos
I've added the allow_future option, and indeed it worked. Thanks alot! Though, not sure what "in the future" means. a matter of the date not being the same in the db and the server or something? Care to explain? On Jan 26, 1:08 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 1/20/07, Panos L

Re: Generic Views - problem with template missing

2007-01-25 Thread James Bennett
On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > Indeed, that did it. Though, I'm curious, as there's already content in > the posts table, shouldn't these show up as I've defined them in the > template? Do the Posts already in the table have their pub_date in the future, by any chance?

Re: Generic Views - problem with template missing

2007-01-25 Thread [EMAIL PROTECTED]
n your urls.py.Indeed, that did > > it. Though, I'm curious, as there's already content in > the posts table, shouldn't these show up as I've defined them in the > template? > > > G > > > On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrot

Re: Generic Views - problem with template missing

2007-01-20 Thread Panos Laganakos
I've defined them in the template? > G > > On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > > > > > I'm using Django 0.95 release. > > > I've got a simple blog, which I wanna move to generic views. > > > in settings.py: &g

Re: Generic Views - problem with template missing

2007-01-20 Thread Guillermo Fernandez Castellanos
Maybe you need the allow_empty=True option in your urls.py. G On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > > I'm using Django 0.95 release. > > I've got a simple blog, which I wanna move to generic views. > > in settings.py: > TEMPLATE_DIRS

Generic Views - problem with template missing

2007-01-20 Thread Panos Laganakos
I'm using Django 0.95 release. I've got a simple blog, which I wanna move to generic views. in settings.py: TEMPLATE_DIRS = ( '/home/panos/projects/panos/templates', ) in ./blog/urls.py: from django.conf.urls.defaults import * from panos.blog.models im

Re: Generic views and filtering

2007-01-20 Thread Nicolas Steinmetz
natebeaty wrote: > > You can do this without a wrapper -- your url entry was close: > > (r'^tag/(?P[-\w]+)/$','django.views.generic.list_detail.object_detail', > dict(queryset=Tag.objects.all(), template_object_name='tag', > slug_field='url')), > > and you'll get a list in /templates/tags/tag_

Re: generic views and non-editable foreign keys

2007-01-19 Thread Maxime Biais
On 1/19/07, qhfgva <[EMAIL PROTECTED]> wrote: I think you have a small error in your example. Should be: class Thing(models.Model): #element = models.ForeignKey(Thing) element = models.ForeignKey(Element) name = models.CharField(maxlength=100) Thank you, corrected. So I guess

Re: generic views and non-editable foreign keys

2007-01-18 Thread qhfgva
I think you have a small error in your example. Should be: class Thing(models.Model): #element = models.ForeignKey(Thing) element = models.ForeignKey(Element) name = models.CharField(maxlength=100) Also I figured out my problem (I think). I was passing ForeignKey editable=False, appa

Re: generic views and non-editable foreign keys

2007-01-16 Thread Maxime Biais
On 17 jan, 06:31, "qhfgva" <[EMAIL PROTECTED]> wrote: Thanks for the link. Using a wrapper is one of the things I had tried. Here is what I tried. I *think* I'm close, but I don't see the last little bit that I'm missing: models.py class Foo(models.Model): charfoo = models.CharFiel

Re: generic views and non-editable foreign keys

2007-01-16 Thread qhfgva
Thanks for the link. Using a wrapper is one of the things I had tried. Here is what I tried. I *think* I'm close, but I don't see the last little bit that I'm missing: models.py class Foo(models.Model): charfoo = models.CharField(maxlength=10) class Goo(models.Model): chargoo = mod

Re: Generic views and filtering

2007-01-15 Thread natebeaty
You can do this without a wrapper -- your url entry was close: (r'^tag/(?P[-\w]+)/$','django.views.generic.list_detail.object_detail', dict(queryset=Tag.objects.all(), template_object_name='tag', slug_field='url')), and you'll get a list in /templates/tags/tag_detail.html called post_set:

Re: Generic views and filtering

2007-01-15 Thread Nicolas Steinmetz
David Zhou wrote: On Jan 12, 2007, at 6:25 PM, Nicolas Steinmetz wrote: Do I have to do as James [1] suggests, ie to filter it in views.py with some generic views methodes ? That's the way I do it. It's a very simple wrapper, and also allows me to add a host of other thing

Re: generic views and non-editable foreign keys

2007-01-13 Thread Honza Král
I would recommend you reading this blog by James Bennet: http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-generic-views it has some great tips on using and extending generic views... On 1/14/07, qhfgva <[EMAIL PROTECTED]> wrote: So far I've been using generi

generic views and non-editable foreign keys

2007-01-13 Thread qhfgva
So far I've been using generic views for everything so I'm not sure if I've reached the end of what those can do, or just need some better understanding of how to use them. I have a Foo model and a Goo model which among other attributes has a non-editable ForeignKey reference ba

Re: Generic views and filtering

2007-01-12 Thread David Zhou
On Jan 12, 2007, at 6:25 PM, Nicolas Steinmetz wrote: > Do I have to do as James [1] suggests, ie to filter it in views.py > with some generic views methodes ? That's the way I do it. It's a very simple wrapper, and also allows me to add a host of other things into the con

Generic views and filtering

2007-01-12 Thread Nicolas Steinmetz
Hello, I have a few question with generic views as I can't manage to have all posts related to a tag or category My model is : class Post(models.Model): author = models.ForeignKey(User) title = models.CharField(maxlength=50) summary = models.TextField(blank=True) me

Re: included generic views and passing extra options

2006-12-18 Thread catklok
ok. my extremely hackish fix was to add this to the included module's url section. is there a better way to do this? def add_context(context): if(isinstance(context, dict)): for key in context: info_dict['extra_context'][key] = context[key] --~--~-~--~~-

Re: included generic views and passing extra options

2006-12-18 Thread catklok
Just a minor revision to the bottom example > -- project which uses module_foo > > urlpatterns = (r'^admin/', include('module_foo'), > {'extra_context' : {'foo2' : expression}}),) --~--~-~--~~~---~--~~ You received this message because you are sub

included generic views and passing extra options

2006-12-18 Thread catklok
Perhaps I'm missing something in the documentation, but is this not possible with generic views? Here's an example below. --included module_foo info_dict = { 'extra_context': {'some_var1': expression} } urlpatterns = patterns('django.views.generic.list_de

Sitemaps and generic views

2006-12-13 Thread [EMAIL PROTECTED]
I kinda asked the before, but maybe I wasn't clear. I know you can use sitemaps with an object_detail generic view, and applaud the developers for how easy it is to do so. But how do you use them with an .object_list view? In particular, the genericSitemap, or in general? --~--~-~--~-

Re: is there a way to combine generic views?

2006-12-09 Thread machineghost
ation at all. (Of course, if they are unrelated, everything everyone else said about extending generic views is dead on). One thing that no one here has mentioned, and which the documentation also does a poor job of mentioning (presumably because it explains models before it explains templates, and

Re: is there a way to combine generic views?

2006-12-07 Thread Terji7
Condredge wrote: > Hey Anton, > Another option is to write a wrapper view that makes use of the generic > views but adds more to it. James Bennett over at B-List wrote a very > useful article on this: > http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-gener

Re: is there a way to combine generic views?

2006-12-07 Thread Condredge
Hey Anton, Another option is to write a wrapper view that makes use of the generic views but adds more to it. James Bennett over at B-List wrote a very useful article on this: http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-generic-views

Re: Re: is there a way to combine generic views?

2006-12-07 Thread Jay Parlar
On 12/7/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 12/7/06, Anton Daneika <[EMAIL PROTECTED]> wrote: > > I want a page which displays both the details of an object and the list of > > the objects. Is there a known way to combine generic views to produce su

Re: is there a way to combine generic views?

2006-12-07 Thread Adrian Holovaty
On 12/7/06, Anton Daneika <[EMAIL PROTECTED]> wrote: > I want a page which displays both the details of an object and the list of > the objects. Is there a known way to combine generic views to produce such a > thing? The problem is that all generic views return HttpResponse which

is there a way to combine generic views?

2006-12-07 Thread Anton Daneika
Greetings, django users. I want a page which displays both the details of an object and the list of the objects. Is there a known way to combine generic views to produce such a thing? The problem is that all generic views return HttpResponse which I don't need in that case -- just the proce

Re: Question concerning generic views or date based views in general

2006-12-04 Thread Jay Parlar
On 12/3/06, Oliver Andrich <[EMAIL PROTECTED]> wrote: > Hi, > > I am currently developing a small Django application for my personal use. > Now I like to have a date based archive page, and I thought that this > finally is a good thing to look into generic views. My requireme

Question concerning generic views or date based views in general

2006-12-03 Thread Oliver Andrich
Hi, I am currently developing a small Django application for my personal use. Now I like to have a date based archive page, and I thought that this finally is a good thing to look into generic views. My requirements are, that I can display the actually database item on the page and in a side bar

Re: html templates for generic views

2006-11-27 Thread [EMAIL PROTECTED]
i got a app in svn you can check out svn co http://fivethreeo.dynalias.org/repos/fivelib/ u: public p: public --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

html templates for generic views

2006-11-27 Thread phess
I must quickly develop a complete website, so I chose "the Web framework for perfectionists with deadlines". ;) In my first tests with a web-based registration mechanism, I'd like to use default (could be quick n' dirty) templates, but these seem to be unavailable. Since I'm really not intereste

Re: drilling down with generic views

2006-11-17 Thread [EMAIL PROTECTED]
Hello again, I just figured out that this is very easy to implement in Python 2.5, thanks to that version's revamped calendar module. I keep thinking that I must be missing some boneheadedly simple way to do it with the Django generic views, though. Best, Hank Sim

drilling down with generic views

2006-11-14 Thread [EMAIL PROTECTED]
Hi there, I'm wondering why the date-based generic views don't provide easy hooks to drill down to the week and date level. The "date_based.archive_index" view gives the template date_list, a list of all years for which there are objects

Re: tabindex HTML attribute: any way to assign to form fields in Generic Views?

2006-11-10 Thread Ivan Sagalaev
Twitchmedia wrote: > Does anyone know if it's possible to assign tabindex values to forms in > a Generic View within the template? Since the INPUT fields are > automatically generated Yet still you have access to raw data. Instead of: {{ form.myfield }} you can write something like:

tabindex HTML attribute: any way to assign to form fields in Generic Views?

2006-11-09 Thread Twitchmedia
Greetings! Does anyone know if it's possible to assign tabindex values to forms in a Generic View within the template? Since the INPUT fields are automatically generated, I'm not sure this is possible without using Javascript to set the tabindex after the forms have been created. Have I answere

Re: Generic Views

2006-11-07 Thread [EMAIL PROTECTED]
Ok, it works now like a charm --~--~-~--~~~---~--~~ 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 from this group, send email to [

Re: Re: Generic Views

2006-11-06 Thread Guillermo Fernandez Castellanos
ld='slug', allow_future=True)), Hope it helps, G On 11/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > On 11/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Everything works perfectly except the Generic views. > > > > It throws a 404 error

Re: Re: Generic Views

2006-11-06 Thread Jay Parlar
On 11/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Everything works perfectly except the Generic views. > > It throws a 404 error stating that there are no entrys. But there are > and I can physically see that using select * from the database tables. > If I alter

Re: Generic Views

2006-11-06 Thread [EMAIL PROTECTED]
the templates with base.html and the app_name folder ( in this case blog) inside the templates directory. Everything works perfectly except the Generic views. It throws a 404 error stating that there are no entrys. But there are and I can physically see that using select * from the database tables

Re: Generic Views

2006-11-06 Thread Guillermo Fernandez Castellanos
uld think off. I even changed the database from SQLite > > to MySQL. > > Everytime I did things fresh. But I also tried all permutations and > > combinations on each installtion/project > > But generic views does not work. > > > > I can get it to work with cl

Re: Generic Views

2006-11-06 Thread Guillermo Fernandez Castellanos
rom SQLite > to MySQL. > Everytime I did things fresh. But I also tried all permutations and > combinations on each installtion/project > But generic views does not work. > > I can get it to work with classical views. I have a written a fairly > detailed app with classical

Re: Generic Views

2006-11-06 Thread [EMAIL PROTECTED]
permutations and combinations on each installtion/project But generic views does not work. I can get it to work with classical views. I have a written a fairly detailed app with classical views. I have a project coming up which has some 10 miniapps and comination of about 40 url patterns. Writing

Re: Generic Views

2006-11-06 Thread Jay Parlar
On 11/5/06, Keith Mallory <[EMAIL PROTECTED]> wrote: > I wrote a blog using classic views (writing functions for reach > URLpattern). It works perfectly. However when I tried to convert it using > the same database using generic views, it does not work. > > > Then I trie

Re: Problems with template IFs and generic views

2006-11-06 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: > I'm using django.views.generic.list_detail.object_detail to show a > page. Beside text it has optional "leftmenu" field. What I want to do > is to show it in a html block if it exists (there is somethign in > "leftmenu"). The problem is that it shows always or never. >

Problems with template IFs and generic views

2006-11-05 Thread [EMAIL PROTECTED]
I'm using django.views.generic.list_detail.object_detail to show a page. Beside text it has optional "leftmenu" field. What I want to do is to show it in a html block if it exists (there is somethign in "leftmenu"). The problem is that it shows always or never. I have: ### {% if o

Generic Views

2006-11-05 Thread Keith Mallory
I wrote a blog using classic views (writing  functions for reach URLpattern). It works perfectly. However when I tried to convert it using the same database using generic views, it does not work.Then  I tried using the updated code from the following link http://fallingbullets.com/blog/2006/aug/06

<    1   2   3   4   5   6   7   8   >