Re: Verbose name in template

2006-03-28 Thread limodou
On 3/29/06, Topdeck <[EMAIL PROTECTED]> wrote: > > Hi there, I was wondering if there's a way to access the verbose_name > of a field from the template? > > Thanks, > Topdeck > I think it's difficult, if you are using manipulator created by AddManipulator or ChangeManipulator, and manipulator u

Verbose name in template

2006-03-28 Thread Topdeck
Hi there, I was wondering if there's a way to access the verbose_name of a field from the template? Thanks, Topdeck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Mysterious thread problem

2006-03-28 Thread Timo Mäkelä
Hello all, I use Windows XP, MySQL 4.1 and Django trunk version. Until yesterday everything worked fine, but now I have really weird thread problem with django's own developement server. Eventually pages are shown correctly, but it's rather rare than rule, and sometimes some images or css-files d

Re: ANN:Woodlog Testing

2006-03-28 Thread limodou
On 3/29/06, limodou <[EMAIL PROTECTED]> wrote: > I'm very happy announce that woodlog (multiuser blog system is hosted > on DreamHost, it's openning and receives testing.) > > You can test it, but the data may be lost, I only use it to test my project. > I'm sorry that I lost the url: http://www

ANN:Woodlog Testing

2006-03-28 Thread limodou
I'm very happy announce that woodlog (multiuser blog system is hosted on DreamHost, it's openning and receives testing.) You can test it, but the data may be lost, I only use it to test my project. -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.c

Re: Django Website Running well, MySQL Connectivity Keeps going away

2006-03-28 Thread [EMAIL PROTECTED]
Okay, I've just applied this patch. I imagine all will go well but I'm monitoring. Thanks, Y-Coci --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Customising Admin

2006-03-28 Thread Rune Strand
Adrian Holovaty wrote: > Hey Rune, > > That problem has been fixed in Django's development branch and will no > longer be an issue in the next release. > > For now, you could hack around it by removing that button with > JavaScript using the admin.js hook... > > Adrian I see! I'm in no rush so

Re: display_inline=True?

2006-03-28 Thread pbx
> it's not really in the scope of the admin to display > information that can't be edited. Anything along those lines is > probably a candidate for customization I'll buy that. Admin customization tips (in addition to reading the source) would be welcome at this point. I thought I had seen some,

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Todd O'Bryan
On Mar 28, 2006, at 8:20 AM, Andy Dustman wrote: > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > >> OperationalError: (2002, "Can't connect to local MySQL server through >> socket '/var/lib/mysql/mysql.sock' (13)") > > This indicates your MySQL server isn't running, and you are using > DATABASE_

Re: Overthinking urls.py?

2006-03-28 Thread limodou
On 3/29/06, Arthur <[EMAIL PROTECTED]> wrote: > > > > "correct" and just as simple, and each time I've failed. As far as > > > I'm concerned, if someone can come up with a way to do this that's > > > stupidly simple then I'm all for a change, but at the same time > > > get_absolute_url() is a war

Searching in a foreign table field

2006-03-28 Thread Jaime G. Wong
Hi, Newbie here. I've got two models, Song and Queue. The Queue model contains foreign keys of songs. In the Admin I want to search for song names so I did: class META: admin = meta.Admin ( list_display = ('date', 'song'), search_fields = ('s

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-28 Thread Eugene Lazutkin
Adrian Holovaty wrote: > > Thanks, guys! I've commited that. Woot! 1539 and 1442 are both committed! Now all multithreaded guys, and MySQL users can start up projects right out of the box without digging for "magic incantations" in tickets, mail lists, and blogs! Thanks, Eugene --~--~-

Re: Virtual hosting and CommonMiddleware redirects

2006-03-28 Thread Luke Plant
On Wednesday 29 March 2006 00:33, Luke Plant wrote: > Hi, > > I'm using python-hosting which is working great so far. I've found > one problem with the way that CommonMiddleware does redirects. > Python-hosting give you your own apache instance, forwarding on > requests from the main one on the s

Virtual hosting and CommonMiddleware redirects

2006-03-28 Thread Luke Plant
Hi, I'm using python-hosting which is working great so far. I've found one problem with the way that CommonMiddleware does redirects. Python-hosting give you your own apache instance, forwarding on requests from the main one on the same machine (I think). This means that HTTP_HOST is not s

Re: Customising Admin

2006-03-28 Thread Adrian Holovaty
On 3/28/06, Rune Strand <[EMAIL PROTECTED]> wrote: > Thanks! I tried that now. The Add-button disappears, but alas the > 'Save and add another' button is still there and gives an unfriendly > "Permission denied" if clicked. Hey Rune, That problem has been fixed in Django's development branch an

Re: Customising Admin

2006-03-28 Thread Rune Strand
Thanks! I tried that now. The Add-button disappears, but alas the 'Save and add another' button is still there and gives an unfriendly "Permission denied" if clicked. I've been reading the Model docs and the META docs, but I can't find any obvious way. --~--~-~--~~~

Re: Mixing with Mailman?

2006-03-28 Thread Max Battcher
On 3/26/06, shredwheat <[EMAIL PROTECTED]> wrote: > > I'm planning the development of a site that will have several > integreated mailing lists. I think Django and Mailman could be a good > mix for this. After some intitial browsing it doesn't look hard to > import the Mailman package and start qu

Re: Overthinking urls.py?

2006-03-28 Thread Glenn Tenney
On Tue, Mar 28, 2006 at 08:44:48PM +0200, Arthur wrote: > That's similar to what I do. The get_absolute_url() concatenates a > _BASE_URL from settings.py or from the top of models.py with > what you call get_id_for_url. This isn't completely clean but easy to > change if you remember where to look

Re: Overthinking urls.py?

2006-03-28 Thread Arthur
> > "correct" and just as simple, and each time I've failed. As far as > > I'm concerned, if someone can come up with a way to do this that's > > stupidly simple then I'm all for a change, but at the same time > > get_absolute_url() is a wart I'm willing to live with. > > In the model you want to

Re: Overthinking urls.py?

2006-03-28 Thread Max Battcher
On 3/28/06, pbx <[EMAIL PROTECTED]> wrote: > I think rolling functionality similar to ABSOLUTE_URL_OVERRIDES into > URLconfs is the way to go. As others have pointed out, > get_absolute_url() doesn't cover enough ground and creates unnecessary > coupling. You realize that because ASOLUTE_URL_OVER

Re: Overthinking urls.py?

2006-03-28 Thread Glenn Tenney
On Tue, Mar 28, 2006 at 12:19:39PM -0600, Jacob Kaplan-Moss wrote: > "correct" and just as simple, and each time I've failed. As far as > I'm concerned, if someone can come up with a way to do this that's > stupidly simple then I'm all for a change, but at the same time > get_absolute_url()

web

2006-03-28 Thread 2ExtremeStudios.com
Hello, 2ExtremeStudios.com would like to offer you a great deal on a brand new website for your business. We invite you to visit www.2ExtremeStudios.com, we offer business information site design and e-store integration, as well as other services. Thanks for your time, Daniel N. Phone. 1.416.834

Re: Overthinking urls.py?

2006-03-28 Thread Jacob Kaplan-Moss
On Mar 28, 2006, at 8:55 AM, pbx wrote: > I think rolling functionality similar to ABSOLUTE_URL_OVERRIDES into > URLconfs is the way to go. As others have pointed out, > get_absolute_url() doesn't cover enough ground and creates unnecessary > coupling. > > Simon expresses it well here: > > http:

Re: What is Caching my DB

2006-03-28 Thread Siah
Thank you Michael, I must add that on my laptop using django's runserver command, this problem does not exist. Moreover, my settings.py middlewares are default installation and holds no information in regard to caching: MIDDLEWARE_CLASSES = ( "django.middleware.common.CommonMiddleware",

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Andy Dustman
On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > Andy Dustman wrote: > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > > > > > Andy Dustman wrote: > > > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > > > > > OperationalError: (2002, "Can't connect to local MySQL server through > > >

Re: apache threading - 'QueryDict' object has no attribute '_mutable'

2006-03-28 Thread Adrian Holovaty
On 3/25/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > The patch is in the Trac: http://code.djangoproject.com/ticket/1539. > I've submitted both versions for the Django trunk and the magic-removal > branch. > > Big thanks to Alex Brown for finding the bug and testing the fix. Thanks, guys! I'v

Re: ASCII or PDF version of docs?

2006-03-28 Thread Glenn Tenney
On Tue, Mar 28, 2006 at 11:11:58AM -0600, Adrian Holovaty wrote: > Alternatively (or maybe additionally), we could have a separate > downloadable tarball of all the docs in HTML format, with all the CSS > and images. I would prefer not to include all of that in the main > Django distribution, beca

Re: ASCII or PDF version of docs?

2006-03-28 Thread Arthur
> > I maintain that all of the online docs need to be in the tar file... > > It would be nice and clean to take the code that converts the ReST > docs into HTML, and the unit tests into HTML, and bundle that with > Django along with a simple view that displays it, converting the docs > on the fly

Re: ASCII or PDF version of docs?

2006-03-28 Thread Adrian Holovaty
On 3/28/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: > Are these examples helpful? Certainly, but... > > (a) they need to be in a different and much more obvious location... oh, > in the docs directory would be a start. > > (b) they are not the complete text of what's online and the parts tha

Re: ASCII or PDF version of docs?

2006-03-28 Thread Glenn Tenney
On Sun, Mar 26, 2006 at 10:40:53PM -0600, Adrian Holovaty wrote: > On 3/24/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: > > You don't get all of the model examples -- and some of the > > needed documentation is in the example pages surrounding the actual > > examples. > > That's incorrect; you do

Re: display_inline=True?

2006-03-28 Thread Wilson Miner
AFAIK, it's not really in the scope of the admin to display information that can't be edited. Anything along those lines is probably a candidate for customization. On 3/28/06, pbx <[EMAIL PROTECTED]> wrote: > > When viewing one object in the admin (say, a Landlord) I'd like to be > able to displa

Re: Customising Admin

2006-03-28 Thread Wilson Miner
If you only give the user permission to change your object, they will not see an add button when they log in. On 3/28/06, Rune Strand <[EMAIL PROTECTED]> wrote: > > Just to learn Django, I'm 'porting' a small CMS I wrote in PHP for a > customer. While the standard admin buttons "Save an add anoth

Re: Overthinking urls.py?

2006-03-28 Thread pbx
I think rolling functionality similar to ABSOLUTE_URL_OVERRIDES into URLconfs is the way to go. As others have pointed out, get_absolute_url() doesn't cover enough ground and creates unnecessary coupling. Simon expresses it well here: http://groups.google.com/group/django-developers/msg/98ee1a

Re: admin apache solved? / now mysql problem

2006-03-28 Thread abe
Andy Dustman wrote: > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > > Andy Dustman wrote: > > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > > > OperationalError: (2002, "Can't connect to local MySQL server through > > > > socket '/var/lib/mysql/mysql.sock' (13)") > > > > > > This

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Andy Dustman
On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > Andy Dustman wrote: > > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > > > OperationalError: (2002, "Can't connect to local MySQL server through > > > socket '/var/lib/mysql/mysql.sock' (13)") > > > > This indicates your MySQL server isn't running

Custard Melt - abandonware?

2006-03-28 Thread Tapiwa
Activity seems to have died with custard melt. There haven't been any new posts on the blog recently and no updates on when v1.0 will be available. I will be doing an advocacy/community site in the next month or so, and this is one of the toolkits I wanted to evaluate alonside civicspace. Is an

Re: admin apache solved? / now mysql problem

2006-03-28 Thread abe
Andy Dustman wrote: > On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > > > OperationalError: (2002, "Can't connect to local MySQL server through > > socket '/var/lib/mysql/mysql.sock' (13)") > > This indicates your MySQL server isn't running, I think it is, since the admin site works fine if I use ma

Re: admin apache solved? / now mysql problem

2006-03-28 Thread Andy Dustman
On 3/28/06, abe <[EMAIL PROTECTED]> wrote: > OperationalError: (2002, "Can't connect to local MySQL server through > socket '/var/lib/mysql/mysql.sock' (13)") This indicates your MySQL server isn't running, and you are using DATABASE_HOST="localhost". -- The Pythonic Principle: Python works the

Re: Overthinking urls.py?

2006-03-28 Thread Doug Van Horn
> ...but we've given some thought to putting the > get_absolute_url() logic in URLconfs instead, so at least the > logic is in a single file. I'm not as concerned with where it's encapsulated, just that it is. I didn't know about the get_absolute_url() method and the ABSOLUTE_URL_OVERRIDES menti

Re: Custom annotations on error emails

2006-03-28 Thread Ned Batchelder
I guess I don't have a clear opinion on the best way to do it.  Keep it in mind, and maybe another data point will make the decision clear.  For now, I've used an egregious hack (I've stuffed the data I want to see into a META field so the default processing will show it to me!). --Ned [EMAIL

Get objects in _manipulator_validate_.....() methods

2006-03-28 Thread Rudolph
I'm writing a _manipulator_validate_.() method. These methods become methods for the manipulator of a model and will be validated before save() is called. Any exception of validators.ValidationError will very nicely be displayed in the admin interface (if your raise such an exception in _pre_

Re: Overthinking urls.py?

2006-03-28 Thread Doug Van Horn
A sed won't work in all situations as it relies on the fact that you constuct the URL in a particular way. What if the URL is constructed dynamically in a template? Or in code? Not to mention the fact that it breaks application encapsulation. If I have ten integrated apps deployed a syntax cha

Re: admin apache solved? / now mysql problem

2006-03-28 Thread abe
Adrian Holovaty wrote: > On 3/24/06, abe <[EMAIL PROTECTED]> wrote: > > I get a blank screen (in the browser) and the > > httpd error logs say : > > > > [Fri Mar 24 18:36:09 2006] [notice] mod_python: (Re)importing module > > 'django.core.handlers.modpython' > > [Fri Mar 24 18:36:17 2006] [notice

Re: Manipulator fields

2006-03-28 Thread limodou
On 3/28/06, PythonistL <[EMAIL PROTECTED]> wrote: > > In my program I use something like this: > > # > > ... > > for Field in manipulator.fields: > #do something > print Field >. > .. > # > print Field there > can print the corr

Re: follow relationship

2006-03-28 Thread Todd O'Bryan
On Mar 27, 2006, at 11:40 PM, Ivan Sagalaev wrote: > > Todd O'Bryan wrote: > >> The tutorial explains how to get objects based on field values, but I >> need to get a subset of the objects in a OneToMany relationship based >> on one of their values. Here's an example: >> >> BRANCH_KINDS = ((0, '

Re: customised generic view

2006-03-28 Thread yml
Thank you Michael, This make sense now to me, I was expecting to much from it. --~--~-~--~~~---~--~~ 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.co

Re: Manipulator fields

2006-03-28 Thread bruno desthuilliers
PythonistL wrote: > In my program I use something like this: > > # > > ... > > for Field in manipulator.fields: s/F/f/ it's an instance, not a class (Python's convention is to use CamelCase for classes and all_lowers for instances). > #do something > print Fi

Re: choices

2006-03-28 Thread Todd O'Bryan
On Mar 27, 2006, at 10:13 PM, Max Battcher wrote: > If you visit the Admin's documentation site (link in the top bar), > under > Models it will point you to the fact that Django magically creates a > function for you to do just that. In your example this would be: > > something.get_kind_display

Re: customised generic view

2006-03-28 Thread Michael Radziej
yml schrieb: > Eureka! > [...] :-) > Based on this, I can tell you that I do not understand at all what the > following statement is doing. > manipulator.do_html2python(new_data) It converts the form data as received from the http POST request (strings) into the datatypes for the associat

Manipulator fields

2006-03-28 Thread PythonistL
In my program I use something like this: # ... for Field in manipulator.fields: #do something print Field . .. # print Field there can print the correct value that is e.g. but because Field is an instance I can not use that

Re: customised generic view

2006-03-28 Thread yml
Eureka! Thank you all for your help and support. After 2 days of test and fails. here it is the solution: Here it is the save function which is solving my issue: def save(self, new_data): temp = Profile( user=users.get_object(pk=new_data['user']), pseudo=n

Customising Admin

2006-03-28 Thread Rune Strand
Just to learn Django, I'm 'porting' a small CMS I wrote in PHP for a customer. While the standard admin buttons "Save an add another", "Save and continue editing" and "Add ..." makes perfectly sense in most of the back-end functionality, I have one page where it doesn't: A Settings page where thin