Re: url parameters go missing

2008-05-31 Thread M.Ganesh
Karen Tracey wrote: > On Fri, May 30, 2008 at 9:48 PM, Karen Tracey <[EMAIL PROTECTED] > > wrote: > > On Fri, May 30, 2008 at 7:53 PM, M.Ganesh <[EMAIL PROTECTED] > > wrote: > > > Hi All, > > I have this url to start a no

Re: Just getting started

2008-05-31 Thread Russell Keith-Magee
On Thu, May 29, 2008 at 10:14 PM, jfinke <[EMAIL PROTECTED]> wrote: > > The problem then becomes is there any easy to sync the notebook > information back with HQ when the notebooks come home or VPN in or > whatever? Do I need to write a program to export it out and then > import it back in? Or

Re: Use variables inside an 'include' tag (and/or: how to set a variable in a template)

2008-05-31 Thread @@
On 5/31/08, Alex Morega <[EMAIL PROTECTED]> wrote: > > > > On May 31, 2008, at 00:36 , Berco Beute wrote: > > > > > Unfortunately that doesn't work. This works: > > > > {{ include dir|concat:"/tag.html" }} > > > > But not this: > > > > {% include dir|concat:"/tag.html" %} > > > > Thanks, but I'm st

Re: url parameters go missing

2008-05-31 Thread Karen Tracey
On Sat, May 31, 2008 at 3:29 AM, M.Ganesh <[EMAIL PROTECTED]> wrote: > > Karen Tracey wrote: > > On Fri, May 30, 2008 at 9:48 PM, Karen Tracey <[EMAIL PROTECTED] > > > wrote: > > > > On Fri, May 30, 2008 at 7:53 PM, M.Ganesh <[EMAIL PROTECTED] > >

escaping of (double) quotes in html-attributes in widgets

2008-05-31 Thread thomas
hi, i want to code a widget. therefore i need to provide a callback for the "onclick" event. one of those arguments is a string and thus between double-quotes. in the html-document the string is no more between doublequotes but surrounded by """, which of course does not work. what can i do agains

Need an example of how to use TagField in a template

2008-05-31 Thread M Godshall
I was hoping someone could show me an example of how to use django- tagging's TagField to submit tags from a template. I have the TagField setup in my model that I can edit in the admin, but I am having trouble figuring out how to submit tags from a template. Could someone please point me in the

Re: Need an example of how to use TagField in a template

2008-05-31 Thread Alex Ezell
On Sat, May 31, 2008 at 12:46 PM, M Godshall <[EMAIL PROTECTED]> wrote: > > I was hoping someone could show me an example of how to use django- > tagging's TagField to submit tags from a template. I have the > TagField setup in my model that I can edit in the admin, but I am > having trouble figu

Re: How to get child model' name from parent obj in Multi-table inheritance

2008-05-31 Thread jonknee
On May 30, 11:20 pm, "David.D" <[EMAIL PROTECTED]> wrote: > If there are lots of child model, use hasattr() or capture exception > will not be good? > "add a type field to Person() and overide the save fields on Man and > Woman to set the type field correctly. " will be better? hasattr() doesn't

Change the model name

2008-05-31 Thread Kless
Is possible to change the model name? >From a class as *class FooBar* it's got a model called *foobar*, but I would to get a model called 'foo_bar', without change the class name to 'Foo_Bar'. --~--~-~--~~~---~--~~ You received this message because you are subscri

Display only some tables

2008-05-31 Thread Kless
How to show only any tables to any users -as to the visitors-? --~--~-~--~~~---~--~~ 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 fr

Legacy database, many-to-many field, custom column name and generic foreign key

2008-05-31 Thread MiloZ
Hi, Here's the problem: class AssociationClass(models.Model): fk_model1 = models.IntegerField() fk_model2 = models.IntegerField() model2_type = models.IntegerField() after an inspectdb, I would like to tell django that this is an association class, with a generic foreign key. What

Re: Display only some tables

2008-05-31 Thread Joseph Heck
Hey Kless, I think you need to be a bit clearer on your question. What are you trying to accomplish? On Sat, May 31, 2008 at 11:47 AM, Kless <[EMAIL PROTECTED]> wrote: > > How to show only any tables to any users -as to the visitors-? > > > --~--~-~--~~~---~--~~

Re: Change the model name

2008-05-31 Thread Joseph Heck
If you're talking about changing the display name in the administrative interface, there is the option of setting "verbose name" - see http://www.djangoproject.com/documentation/model-api/#table-names for more information. You can also change the database table name associated with the model objec

Re: Display only some tables

2008-05-31 Thread Kless
1) I want to display any tables to whatever person -public--, but I want not to display tables of both Auth and Sites models 2) And that only can be added more data only by registered users. On 31 mayo, 21:04, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > Hey Kless, > > I think you need to be a bit

Re: Django and i18n

2008-05-31 Thread yml
hello, I have been using this recipe for some times : http://yml-blog.blogspot.com/search/label/Internationalisation It seems to exactly answer your requirements. I hope that helps. --yml On May 30, 6:09 pm, Taevin <[EMAIL PROTECTED]> wrote: > I've been working with translation in Django and it m

images in templates?

2008-05-31 Thread lindec
So this might be a stupid question, but how exactly does one add an image to an HTML template in django? I can't seem to figure out where django thinks my images live. I just want to do, for example, and cannot get it to display. I've tried altering my MEDIA_ROOT, putting the image in the same di

Silly question on models

2008-05-31 Thread Pavel Rebrov
Hello everyone! Sorry for another stupid question, but there it is. I'm building a news app for a website for a self-teaching and figured out I don't understand some basic thing. I want news to publish news from different sources: 1. Add 'em manually all by myself (that's no problem) 2. Allow re

Re: Change the model name

2008-05-31 Thread Kless
No, it wasn't about that, but thanks anyway. On 31 mayo, 21:08, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > If you're talking about changing the display name in the > administrative interface, there is the option of setting "verbose > name" - seehttp://www.djangoproject.com/documentation/model-api

Re: django error about syncdb

2008-05-31 Thread Karen Tracey
On Sat, May 31, 2008 at 2:07 AM, tony yu <[EMAIL PROTECTED]> wrote: > > version info: > django svn version, freebsd 7.0, python 2.5.2 > settings.py: > INSTALLED_APPS = ( >'django.contrib.auth', >'django.contrib.contenttypes', >'django.contrib.sessions', >'django.contrib.sites', >

Re: How to validate form field to be numeric

2008-05-31 Thread Karen Tracey
On Sat, May 31, 2008 at 3:51 PM, meppum <[EMAIL PROTECTED]> wrote: > I want to make sure that the value is a positive integer, but there > doesn't seem to be a widget for that. > Take a close look at the docs for IntegerField and I think you'll see you can use it for this purpose: http://www.dja

Re: Need an example of how to use TagField in a template

2008-05-31 Thread M Godshall
Alex, thanks for your response. Let me give you an example of what I started to do, and I'd appreciate your feedback to see if this would actually work (or if it's just a bad way of doing it). Let's say I wanted to let users submit tags for books on a site. A simple model might look like this:

I get an error when using django and postgresql. ProgrammingError: invalid byte sequence for encoding

2008-05-31 Thread Nathan Zorn
I am using django and postgresql and get an error when I pass in unicode to filter. ProgrammingError: invalid byte sequence for encoding "UTF8": The documentation states that I can pass both in and that django detects what encoding the database uses. Should this be repoted as a bug? --~--~

Re: I get an error when using django and postgresql. ProgrammingError: invalid byte sequence for encoding

2008-05-31 Thread Karen Tracey
On Sat, May 31, 2008 at 7:25 PM, Nathan Zorn <[EMAIL PROTECTED]> wrote: > > I am using django and postgresql and get an error when I pass in > unicode to filter. > > ProgrammingError: invalid byte sequence for encoding "UTF8": > > > The documentation states that I can pass both in and that django

A for B C as D in templates

2008-05-31 Thread Rodrigo Culagovski
Looking through documentation for the FreeComment app, I came across this template syntax: {% get_free_comment_count for blog.entry object.id as comment_count %} Where can I find documentation for use of the "A for B C as D" syntax in Django templates? --~--~-~--~~~-

Re: url parameters go missing

2008-05-31 Thread M.Ganesh
Karen Tracey wrote: > On Sat, May 31, 2008 at 3:29 AM, M.Ganesh <[EMAIL PROTECTED] > > wrote: > > > Karen Tracey wrote: > > On Fri, May 30, 2008 at 9:48 PM, Karen Tracey > <[EMAIL PROTECTED] > >

Re: Change the model name

2008-05-31 Thread Eric Abrahamsen
Are you maybe talking about changing the underlying database table name? http://www.djangoproject.com/documentation/model-api/#table-names On Jun 1, 2008, at 2:45 AM, Kless wrote: > > Is possible to change the model name? > > From a class as *class FooBar* > it's got a model called *foobar*,

Re: Silly question on models

2008-05-31 Thread [EMAIL PROTECTED]
I would suggest adding a field for "source", which you can grab from the RSS feed or submit from the form to keep track of where it came from, and some sort of status field (submitted/published) to hold them until someone has reviewed the submissions. --~--~-~--~~~---~-

Re: A for B C as D in templates

2008-05-31 Thread Julien
This is not a standard syntax but the particular syntax for the tag get_free_comment_count. Check its code in django.contrib.comments.templatetags.DoCommentCount In your example, 'blog' is the application name, 'entry' the model name to which comments are attached, 'object.id' is the id of the pa

Re: How to get child model' name from parent obj in Multi-table inheritance

2008-05-31 Thread David Zhou
On May 30, 2008, at 11:20 AM, jonknee wrote: > On May 30, 10:38 am, David Zhou <[EMAIL PROTECTED]> wrote: >> You can use also use hasattr(). >> >> Something like >> >> if hasattr(person_obj, 'man'): >> #is man >> elif hassattr(person_obj, 'woman'): >> #is woman >> else: >> #is freakish mutated

Strange:Dev Web server crash with a python.core dump after Admin page being refreshed exactly 16 times

2008-05-31 Thread Stephen Cheng
Hi Guys This is a very strange problem and I haven't resolved it. Dev Web server just crash with a python.core dump and no exception log at all. Problem occurs when you go around the Admin page, either refresh page, add record, delete record. Now I can reproduce it by keeping refresh the admin p