Yep, that did it. Thanks.
Actually, my urls.py was OK, it was decoupled into the application
directory. But that darn template got imported into the project sort of
late at night, and foxed me into misinterpreting the symptoms.
I have seen some template errors caught by django. Some but not all,
Ok; there are a few problems
1) in urls.py, new_dict pushes post_save_redirects to "/invoices/".
However, no URL handler is set up for that url. However, you haven't
hit this problem yet - the main problem is...
2) ticket_form.html doesn't contain a form.theater element. As a
result, submitting
Russell, thanks for looking into this! See comments & code below.
Tom
Russell Keith-Magee wrote:
>
> - Are you sure that the database has been synced to match the 'with
> foreign key' version of the model? Drop the db and recreate to be
> sure.
Yes, I had done that.
> - What does the developmen
On 10/24/06, doubtintom <[EMAIL PROTECTED]> wrote:
>
> Similarly for django.views.generic.create_update.update_object. They
> work fine on the cheetsheet model, but when a foreign key is added to
> the Theater model that I made up for testing, changes do not take,
> browser does not forward.
>
> I
Sure, Russ, I'll be more explicit, hopefully less Zen-like.
The cheetsheet model as-is works just as expected with
django.views.generic.create_update.create_object, i.e.
1. url kicks off generic view add to template with empty fields as
expected
2. I enter data, click save
3. I get whisked back t
On 10/24/06, doubtintom <[EMAIL PROTECTED]> wrote:
> However, nearly the same model with a foreign key to another model in
> the same app (or project, I've tried it both ways) does not:
Help us help you. What does "does not work" mean? What success did you
have with the cheatsheet model? What pro
That is, create/update/delete generic views do not create, update, or
delete on a model (table) with a foreign key within the app or project.
At least I cannot figure out how.
They do, however, work fine on a model with a foreign key to
django.contrib.auth.models.User. I got this from the
http
On 10/23/06, zenx <[EMAIL PROTECTED]> wrote:
>
> Hi, are there any plans to add serialization support to generic views?
It sounds like a good idea to me. There are no specific plans (that I
am aware of) to implement this feature, all the core developers are
pretty busy with their
Hi, are there any plans to add serialization support to generic views?
I think it won't be difficult to implement it because generic views are
already programmed and they should only get one extra parameter to know
which type of document they have to return (html (default), xml, json).
It
Hi, i'm developing an application and i need a search function like
admin search in some models. I've tryed modifying generic views, but i
can't make it work. The idea is something like:
[ CODE ]
def object_list([...] search_fields=None, q=None [...]):
"""
st_update_validation' signals) in the generic views associated with
creation, update. I don't feel this could easily be handled by the
existing pre_save signal because it doesn't seem to have access to
information contained in the request. There doesn't seem to be any
current facilit
Hey James,
On Thu, 2006-10-05 at 10:12 -0500, James Bennett wrote:
> On 10/5/06, John Melesky <[EMAIL PROTECTED]> wrote:
> > Does that mean it's ready for inclusion in the django docs tree? It
> > would be nice to get topics like this covered in the core documentation.
>
> If one of the committe
On 10/5/06, John Melesky <[EMAIL PROTECTED]> wrote:
> Does that mean it's ready for inclusion in the django docs tree? It
> would be nice to get topics like this covered in the core documentation.
If one of the committers thinks it's good enough, then by all means.
I'll happily submit it in ReST
James Bennett wrote:
> On 10/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>> There is some documentation on how Django's signals system works and how
>> to hook into it here: http://code.djangoproject.com/wiki/Signals
>
> I just went through and completely re-wrote that to cover signals in
James Bennett wrote:
> This is probably the way to do it; adding special-case hooks to the
> generic views doesn't sound like a good solution to me.
Well, callables which can be sent into generic views and are executed
just prior to handing off to the template in order to populate
On 10/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> There is some documentation on how Django's signals system works and how
> to hook into it here: http://code.djangoproject.com/wiki/Signals
I just went through and completely re-wrote that to cover signals in
as much detail as I could mu
object from create_object is an instance of
> > HttpResponseRedirect() I can determine if the addition/edit was
> > successful; however, I still don't have access to the new/editted
> > object.
>
> This is probably the way to do it; adding special-case hooks to the
>
termine if the addition/edit was
> successful; however, I still don't have access to the new/editted
> object.
This is probably the way to do it; adding special-case hooks to the
generic views doesn't sound like a good solution to me.
For getting access to the object, I believe that
I make extensive use of generic views in one of my apps. Now that the
app is nearly finished, I'm being asked to do change tracking/audit
trail on the objects managed in the generic views. Recognizing that I
could just create and save django.contrib.admin.models.LogEntry()
objects and pos
I will take a look at it. Thank you!
--~--~-~--~~~---~--~~
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 emai
request execution to the generic list view for songs.
See Malcolm Tredinnick's excellent article on extending generic views
for more on this:
http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-generic-views/
--~--~-~--~~~---~--~~
You received
request execution to the generic list view for songs.
See Malcolm Tredinnick's excellent article on extending generic views
for more on this:
http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-generic-views/
--~--~-~--~~~---~--~~
You received
Hi,
I've got 3 models: Artist, Album and Song.
For getting an artist info I use:
(r'^artists/(?P[-\w]+)/$',
'django.views.generic.list_detail.object_detail', dict(info_dict,
slug_field='identificador')),
I want an url like
www.mysite.com/artists/black_eye_peas/albums/album_name for getting all
Thanx for the link!
I solved the problem by simply
forwarding to my own generic viewmethod
and taking request.path to build my own namespace.
I want general views of *All* my contentobjects without the need to
customize any templete ( but still be able to customize if wanted)
--~--~-~--
to the view .
>
> Target is to get completely automated generic views, without having to
> edit any template
> (maybe have a set of templates designed once, but valid for all
> objects)
>
> So I dont want to pass the parameter to the template but to the second
> urls.py
>
&
I want to build a generic view for all of my objects and according to
the documentation
(http://www.djangoproject.com/documentation/url_dispatch/#captured-parameters)
it is possible to capture a parameter and forward it to the view .
Target is to get completely automated generic views, without
Hi all,
Currently I have a setup whereby a user navigating to a product
category is met with the list of products in that category using
generic views. In urls.py I have the 'info_dicts' handling the
categories so that in the generic view the correct category is
presented to u
rm involving two models? >Or made to receive specific information that will not be stored in a model? You need special forms that are not automatically done.
>The generic views seem to be 'shorcuts' for very common (and>specific!) views. They are very handy, but you find their l
wo models? Or
made to receive specific information that will not be stored in a
model? You need special forms that are not automatically done.
The generic views seem to be 'shorcuts' for very common (and
specific!) views. They are very handy, but you find their limits
pretty quickly as
Hi,in the "docs forms, fields, and manipulators" documentation,it's stated that you can't have the forms automatically created so you need to createyour own forms.In there there's an example that deals with a view & manipulators and a template.
However, if you use "django.views.generic.create_updat
Hello Aidas,
I will try to implement
your view :)
As for pagination, I've found
a great templatetag at:
http://code.djangoproject.com/wiki/CookBookTemplateTags
Thanks,
Robert
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
list and now I need to add
> column sorting in my table.
>
> I am new to both python & Django, and read
> contrib/admin/teamplates,tamplatetags many times and can't understand
> how
> pagination & column sorting works in Admin panel.
>
> Also tried a javascript
take a look at http://www.softcomplex.com table sorting and pagination, simply amazing- Original Message From: Robert <[EMAIL PROTECTED]>To: Django users Sent: Tuesday, September 5, 2006 11:13:55 AMSubject: Generic views table sortHi,I'm using 'object_list' for gettin
used for column
sorting ? (not talking about django admin, it's too hard coded for me
at least
at the moment).
If generic views are the problem here I can ommit it, though pagination
will not be so easy then.
I was considering using a schema below:
model name "Test" with field
On 9/2/06, keukaman <[EMAIL PROTECTED]> wrote:
> {% get_free_comment_list for blog.entry object.id as comment_list %}
>
> But when I display the comments they are in the order they were entered
> in the database. Could someone share with me the way to display
> comments to that they display with
I am showing comments on a generic view page by using
{% get_free_comment_list for blog.entry object.id as comment_list %}
But when I display the comments they are in the order they were entered
in the database. Could someone share with me the way to display
comments to that they display with t
I guess manipultors are made for this purpose. I'm not sure but you can
probably override AddManipulator in order to use generic views.
Hope this is the answer to your queston.
This is an example from my excercise blog app (it doesn't use generic
view actually):
#model
c
ich is true for all time, but I would prefer a much more generic way to
> > get the response from the views.
>
> I think the ideal would be to have generic views accept an additional
> parameter which tells them how to format the response -- whether to
> return HTML, or to serialize
generic way to get
> the response from the views.
I think the ideal would be to have generic views accept an additional
parameter which tells them how to format the response -- whether to
return HTML, or to serialize to XML or JSON (since we've got object
serialization already).
See ticke
Dirk,
I think that it's a great option. It doesn't advocate a specific
framework or method even. AJAX views will be very similar to html
views and I agree that having some generic views for AJAX is a great
addition to the Django community, even if it doesn't get added to the
Hi,
I know the discussion about django and ajax compatible response. The
'hardliners' say that you only need to implement your own kind of template -
which is true for all time, but I would prefer a much more generic way to get
the response from the views.
I made a server-side django library
Gnissem wrote:
> I am using generic views to produce a paginated specimen list. In the
> list, you can click on a specimen to get the generic view detail.
> After viewing the detail, the user will likely want to go back to the
> specimen list, on the page where the link came from.
Petar Marić wrote:
> I'm checking out reverse url resolving and I can't help but wonder:
> What happenes when we use generic views? Will it still work?
Hm... Looks like they wouldn't :-(. This'll require some thinking...
--~--~-~--~~~---~
Hi,
I've spent many hours trying to get the following to work (I'm not
blaming Django - I'm very new to Python and Django, it was late etc).
To hopefully make the solution easier to find in Google, I write it
here. Suggestions for improvement are welcome.
Question: using generi
I am using generic views to produce a paginated specimen list. In the
list, you can click on a specimen to get the generic view detail.
After viewing the detail, the user will likely want to go back to the
specimen list, on the page where the link came from. Pressing the back
button works, but
Hi,
I'm checking out reverse url resolving and I can't help but wonder:
What happenes when we use generic views? Will it still work?
Regards,
--
Petar Marić
*e-mail: [EMAIL PROTECTED]
*mobile: +381 (64) 6122467
*icq: 224720322
*skype: petar_maric
*web: http://www.peta
Hi,
Sorry to bring this question up again, since it passed over this list
earlier today.
I thought that Malcolm Tredinnick post on extending generic views is
very insightful
http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-generic-views/
as simple as that actually is. Using
Thank you!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For
On 8/15/06, keukaman <[EMAIL PROTECTED]> wrote:
>
> I'm using generic views to display some blog entries. It's a very
> simple app that i'm using to learn django.
>
> The problem I'm having is trying to sort the output with the newest
> entry showing at
I'm using generic views to display some blog entries. It's a very
simple app that i'm using to learn django.
The problem I'm having is trying to sort the output with the newest
entry showing at the top. Does anyone have a simple model.py and
template.html I could look at th
> You're using a variable "feedtype" that's not defined.
>
> It's the same thing as doing this in the Python interactive prompt:
>
> print a + 1
>
> The variable "a" is not defined yet, so Python raises a NameError.
>
> The problem in your case is that your view won't know the value of
> feedt
>
> I think it's worth raising a feature request in the Django Trac for
> this functionality. I can imagine that this would be very useful to a
> lot of people in the future.
>
> Michael
Done!
http://code.djangoproject.com/ticket/2544
--Jon
--~--~-~--~~~---~--~~
On 8/15/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> (r'^/?(?P\w+)/$',
> 'django.views.generic.list_detail.object_list', {'queryset':
> Item.objects.filter(feed__feedtype__feedtype__iexact=feedtype).order_by('-time'),
> 'paginate_by': 15, 'extra_context': {'is_first_page': True}}),
>
> And oddly
Hi Jon,
On 8/15/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
[snip]
> I've just tried removing the regular expression - so the line looks like:
>
> (r'^/?(?P\w+)/$',
> 'django.views.generic.list_detail.object_list', {'queryset':
> Item.objects.filter(feed__feedtype__feedtype__iexact=feedtype).orde
On 15/08/06, Michael van der Westhuizen <[EMAIL PROTECTED]> wrote:
>
> Do you really need the RE in the query? I think the problem is that
> the re call is being evaluated immediately, which the query is lazily
> evaluated. Would the "iexact" not work without the regular expression?
>
> If you do
Hi Jon,
On 8/15/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm dabbling with generic views (thanks to wise advice from others on
> this list), and I'm trying to convert one of my slightly more
> complicated views to use a generic view. The vie
You could simplify your urls.py by extending the generic view with
another view, e.g. an example from the authorization document:
from django.views.generic.date_based import object_detail
@login_required
def limited_object_detail(*args, **kwargs):
return object_detail(*args, **kwargs)
It mi
Hi,
I'm dabbling with generic views (thanks to wise advice from others on
this list), and I'm trying to convert one of my slightly more
complicated views to use a generic view. The vie itself is a simple
list, but my queryset is generated as follows:
Item.obje
Great! That's exactly what I wanted! Thanks.
On 8/8/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>
> another alternative you may want to consider is to piggybak ontop of the
> generic view
>
> have a look
> at
> http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/views/create_update.py
another alternative you may want to consider is to piggybak ontop of the generic viewhave a look at http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/views/create_update.py for a examplewhich adds a 'change_user' and 'last_change' fieldseg. if request.POST: new_data = request.
jeffmikels wrote:
> Thanks for your help. I ended up creating a view to do the work. If the
> data is simple enough and just plain text, is there a compelling reason
> to use AddManipulator or other manipulators instead of just
> object.save()?
>
>
hi,
for example, if you want to validate that
Thanks for your help. I ended up creating a view to do the work. If the
data is simple enough and just plain text, is there a compelling reason
to use AddManipulator or other manipulators instead of just
object.save()?
--~--~-~--~~~---~--~~
You received this messa
> In my models, I have a
> >
> > tags = models.ManyToManyField(Tag, blank=True,
> > filter_interface=models.HORIZONTAL, related_name="tags")
> >
> > when using generic views and form.tags, I get a select box; however, i
> > would rather have a single text box into whic
s.HORIZONTAL, related_name="tags")
>
> when using generic views and form.tags, I get a select box; however, i
> would rather have a single text box into which I can type a string of
> comma separated tags, and then have them parsed behind the scenes. Can
> I still use ge
I'm trying to create a site that has entries of different types and
tags that can link to any type of entry.
In my models, I have a
tags = models.ManyToManyField(Tag, blank=True,
filter_interface=models.HORIZONTAL, related_name="tags")
when using generic views and form.tags, I g
On Fri, 2006-08-04 at 21:50 -0700, bernie2004 wrote:
> when using a generic views object_list,
> i would like to know if there is a faster way to get all
> the extra variables inside a custom template tag:
>
> {% navigation pages page has_previous has_next %}
>
> and
>
when using a generic views object_list,
i would like to know if there is a faster way to get all
the extra variables inside a custom template tag:
{% navigation pages page has_previous has_next %}
and
@register.simple_tag
def navigation( pages, page, has_previous, has_next ):
... create
On 08/07/2006, at 12:12 AM, Jan Claeys wrote:On do, 2006-07-06 at 17:03 -0400, Jay Parlar wrote: On 7/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: If I were to write a backwards compatable patch, is it something you'dbe willing to put in? I'm thinking along the lines of a keywordargument 'allow
I have used custom manipulators to do this
http://www.djangoproject.com/documentation/forms/
class PollAddManipulator(Poll.AddManipulator):
def __init__(self, season):
super(Poll.AddManipulator, self).__init__()
newfields = []
for field in
Let's say I have a list of categories:
- category 1
- category 2
- hide me!
Then on the template side, I (obviously) want to hide the one that says
"hide me!" How to do this? In PHP it would be a matter of modifying the
query that builds the drop-down: [SELECT WHERE active=1].
On 7/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> If I were to write a backwards compatable patch, is it something you'd
> be willing to put in? I'm thinking along the lines of a keyword
> argument 'allow_future' which has a default value of False.
Just for the record (and to close this thread),
I'm using a generic view for a form and have a few drop-downs on the
page. However, I don't want to display every item in the drop-down. I
thought I would put in an "active" switch on them, but can't figure out
how to only show the active items on the template.
would this be A: a filter set up in
Hi,
Malcolm Tredinnick wrote:
> In the object_list view, you are given an "object_list" parameter, which
> is a list of all the objects for that page. To display them, you will be
> doing something like
>
> {% for folder in object_list %}
>
> to iterate over that list. Inside that loop, y
On Mon, 2006-07-24 at 06:30 -0700, sean wrote:
> Thanks for the reply.
> That solution would involve the object_detail view for the folder,
> right?
> I am currently using that one, but pagination would be nice to use on
> the media list, so I would rather get the object_list working.
In the obje
Thanks for the reply.
That solution would involve the object_detail view for the folder,
right?
I am currently using that one, but pagination would be nice to use on
the media list, so I would rather get the object_list working.
I don't think I completely understand the queryset parameter. In the
On Mon, 2006-07-24 at 11:41 +, sean wrote:
> Hi,
> I'm having a hard time getting the generic list view to work for a set
> of related objects.
> I have two models, Folder and Media, where Media has a foreign key
> relationship to Folder. I want to use generic views to ac
Hi,
I'm having a hard time getting the generic list view to work for a set
of related objects.
I have two models, Folder and Media, where Media has a foreign key
relationship to Folder. I want to use generic views to access all the
media related to a specific folder but I can't seem
I got it finally...
changed this:
return render_to_response('main/index.html')
to this:
return render_to_response('main/index.html',
RequestContext(request, {'request': request}))
and that took care of it. Only took a few hours of staring at the
generic
this is what I'm sending out in the view. Basically this is an empty
section of the site that will be created later. However, it bothers me
that the menus and such will not work correctly since it seems I'm not
passing the correct info.
from views.py:
def index(request):
return render_to_
rote:
>
> I think I'm missing something in my own views. Everything created by
> django (admin area, generic views) will get the user info, but when I
> do a view myself it doesn't work. What little tid-bit am I missing here?
>
>
> >
>
--~--~-~--~~---
I think I'm missing something in my own views. Everything created by
django (admin area, generic views) will get the user info, but when I
do a view myself it doesn't work. What little tid-bit am I missing here?
--~--~-~--~~~---~--~~
You received th
Ok, got my problem. May be your problem as well, mamcxyz.
I was using the user variable in a menu. In order to make my webpage
as generic as possible, I had defined a menu.html that I included with
a tag:
register = Library()
def make_menu(context):
pass
make_menu = register.inclusion_tag('s
I am having this problem as well, but only for part of my site. The
admin area works normally, one of my apps works well, but another app
(happens to be the one at '/') does not see the user. {{ user.username
}} returns "". It sees someone logged in, so user.is_anonymous is
false, but everything a
I don't know how to replicate it right now (I tried logging out and
deleting cookies, no dice) but it did happen to me once or twice while
I was developing something. If you only find this problem when you
aren't logged in then treating 'not user' as equivalent to
'user.is_anonymous' should be ok
en, I only can see in my browser:
Welcome, . Thanks for logging in.
Any hint would be greatly apreciated, thanks!
G
On 7/11/06, mamcxyz <[EMAIL PROTECTED]> wrote:
>
> I don't get the USER from context in generic views. I have configured
> the context procesors with django.core.c
I don't get the USER from context in generic views. I have configured
the context procesors with django.core.context_processors.request, but
not work in generic views...Why?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
On do, 2006-07-06 at 17:03 -0400, Jay Parlar wrote:
> On 7/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> >
> > On 7/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > > What's the justification for the date based generic views not showing
> > >
TECTED]> wrote:
>> What's the justification for the date based generic views not showing
>> dates in the future?
>
> The justification is: The system was built for displaying "archival"
> information, not future information. We've just never had that need
On 7/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> If I were to write a backwards compatable patch, is it something you'd
> be willing to put in? I'm thinking along the lines of a keyword
> argument 'allow_future' which has a default value of False.
Sure, feel free to submit!
Adrian
--
Adrian
On 7/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 7/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > What's the justification for the date based generic views not showing
> > dates in the future?
>
> The justification is: The system was built for
On 7/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> What's the justification for the date based generic views not showing
> dates in the future?
The justification is: The system was built for displaying "archival"
information, not future information. We've j
What's the justification for the date based generic views not showing
dates in the future?
I've got a model for community events that looks as follows:
class Event(models.Model):
title = models.CharField(maxlength=200)
slug = models.SlugField(prepopulate_from=("title&q
Well, that fixed it. I guess development using mod_python can be a
little cumbersome.
--~--~-~--~~~---~--~~
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@googlegro
I'm trying to display my records based on date. I've removed
object.list... same result, page returns the same error message.
It's weird, because it was working fine just a few minutes ago.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
On Thu, 2006-06-22 at 03:47 +, Patrick J. Anderson wrote:
> Hi, I've been working with date_based generic views in my application,
> and while everything was going great, all of a sudden I'm getting this
> error on, while trying to access records for a specific month:
>
Hi, I've been working with date_based generic views in my application,
and while everything was going great, all of a sudden I'm getting this
error on, while trying to access records for a specific month:
ViewDoesNotExist at /projects/2006/jun/
Could
On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 6/17/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > def get_absolute_url(self):
> > return "/articles/" + self.pub_date.replace("-","/") + "/" + self.slug
> >
> > But it seems like there'd be a cleaner way (ie. not having to call
> >
On 6/17/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> def get_absolute_url(self):
> return "/articles/" + self.pub_date.replace("-","/") + "/" + self.slug
>
> But it seems like there'd be a cleaner way (ie. not having to call 'replace')
def get_absolute_url(self):
return "/articles/%s/%s" %
ugField(...)
pub_date = models.DateField(...)
And I want the url for a given article to be something like
/articles/2006/06/31/slug
Of course, I use the date_based generic views for that, but what about
get_absolute_url? I was thinking something like:
def get_absolute_url(self):
return "/arti
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> > Wow! I didn't know it would be that simple!
> >
> > What about convenience functions, get_relatedobjectname()?
> > Can 'relatedobjectname' be a field name passed as a parameter?
>
> Yes,
601 - 700 of 794 matches
Mail list logo