Re: pass extra_context to feeds?

2006-12-24 Thread tonetheman
Like what are you trying to pass? And where? Are you trying to pass something to the instance of the class that you have written that inherits from django.contrib.syndication.feeds.Feed? If you are trying get something out of the database, you can just import that into the module that has the Fe

Re: Accessor for field 'somefield' clashes with related field ... Add a related_name argument to the definition for 'somefield'

2006-12-24 Thread Malcolm Tredinnick
On Wed, 2006-12-20 at 06:00 +, [EMAIL PROTECTED] wrote: Hi... I was wondering why when you have something like this: class Loan(models.Model): loan_id = models.AutoField(primary_key=True) originator =models.ForeignKey(UserInfo,null=True) obligor = models.ForeignKey(UserInfo,null=

Re: ContentType matching query does not exist

2006-12-24 Thread Malcolm Tredinnick
On Sun, 2006-12-24 at 16:56 -0800, ad-hoc wrote: I've been playing with django. I'm trying to get the model with its name by: django.contrib.contenttypes.models.ContentType.objects.get(model=modelname) where modelname is a string, but i'm getting the exception/error as above. Using the admin

Re: Proposed Changes

2006-12-24 Thread Jacob Kaplan-Moss
On 12/24/06 5:04 PM, [EMAIL PROTECTED] wrote: So then, in order to access a content type, I would have to import the ContentType instance, and call a function. That's correct. It's much easier for our uses to have an inherited function, or property, on a model to use it. Again, I'm sorry

Re: Unicode URLs

2006-12-24 Thread Victor Ng
Hi Aaron, Sorry for my weird comment on ticket. 2588 - I should have spent more time discussing what I really meant. I'm not sure why 0x2f would ever be a chinese character. URLs are supposed to be encoded as UTF8 as per RFC 2718 and RFC 3986. Using GB18030 and GB2312, I get this: In [6]: '/

Re: Comments framework in development?

2006-12-24 Thread James Bennett
On 12/23/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: There might be some work on the comment views to make them use the newforms framework, but other than that, I can't say I know of any work that is planned. I know that the idea of "pluggable" comment models keeps coming up (where we'd

Re: Unicode URLs

2006-12-24 Thread James Bennett
On 12/23/06, Aaron Jacobs <[EMAIL PROTECTED]> wrote: In the interest of making 'pretty' URLs, I want my application to accept URLs that may potentially contain Chinese characters, and have those URLs parsed by URLconfs. Just keep in mind that in some browsers it won't be "pretty" at all; inste

Re: ContentType matching query does not exist

2006-12-24 Thread [EMAIL PROTECTED]
You're going about this wrong. Model's have more than a name, and model isnt a field for ContentType. You want ContentType.objects.get_for_model I believe On Dec 25, 1:56 am, "ad-hoc" <[EMAIL PROTECTED]> wrote: I've been playing with django. I'm trying to get the model with its name by: django

ContentType matching query does not exist

2006-12-24 Thread ad-hoc
I've been playing with django. I'm trying to get the model with its name by: django.contrib.contenttypes.models.ContentType.objects.get(model=modelname) where modelname is a string, but i'm getting the exception/error as above. Using the admin interface i can see/add/update instances for the

Re: Extrange behavior with get 'self' FK in admin view

2006-12-24 Thread Jorge Gajon
Hi, On 12/20/06, ElGranAzul <[EMAIL PROTECTED]> wrote: Hi, i've and extrange behavior with admin views with the following code: I copied your code to a test project, added the missing Country and Island objects and tried it but I could not reproduce your problem, everything works fine here.

Re: Proposed Changes

2006-12-24 Thread [EMAIL PROTECTED]
So then, in order to access a content type, I would have to import the ContentType instance, and call a function. It's much easier for our uses to have an inherited function, or property, on a model to use it. I do agree that if somethings not core it shouldn't be imbedded, but maybe contrib apps

Re: pure-HTTP deployment?

2006-12-24 Thread G.J. Souverein
2006/12/24, Chris Lee-Messer <[EMAIL PROTECTED]>: On the topic of a pure python wsgi http server. Has anyone checked out twisted. I seem to remember that zope actually nows uses twisted for its server, and there is a twisted.web2.wsgi module that I've seen mentioned elsewhere as a functional ws

Re: Newforms and composite widgets

2006-12-24 Thread Adrian Holovaty
On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: One of the things I was hoping for in newforms but haven't found is a way to do a composite form field that uses multiple elements that reduce to a single python object. E.g., >>> class MyForm(Form): ... postdate = CompositeField(ChoiceF

Re: Best way to accomplish model inheritance

2006-12-24 Thread Aaron Jacobs
Thanks so much for the tips, Favo. There are some points that are unclear to me, so I hope you don't mind if I ask a few questions. On 12/24/06, favo <[EMAIL PROTECTED]> wrote: 1. as you said, use OneToOne field class Place(models.Model):

Re: Your Approach to Schema Evolution?

2006-12-24 Thread ringemup
Thanks, Ned. That seems like a very effective way to do things. It also seems fairly complicated (I have no idea where I would even start with creating an evolution function, or getting the app to check for it on startup). How much work did it take you to set up the infrastructure to do someth

Re: Your Approach to Schema Evolution?

2006-12-24 Thread Todd O'Bryan
This seems a lot like what was supposed to happen in the SoC solution (at least according to what was posted on the Wiki). Derek seemed to do a very good job with the analysis and writing of functional specs, but I think Victor Ng's approach is slightly different. Honestly, I haven't had time t

Re: Ordering flatpages?

2006-12-24 Thread Paul Smith
On Dec 22, 7:57 am, "David Blewett" <[EMAIL PROTECTED]> wrote: Paul Smith wrote: > Another thing on my mind is > what would happen if my flatpages start getting all hierarchical on > me... has anyone had to figure out how to let users manage objects with > something like a file/folder tree?

Re: Proposed Changes

2006-12-24 Thread Jacob Kaplan-Moss
On 12/24/06 7:03 AM, [EMAIL PROTECTED] wrote: I disagree completely with the ticket being closed. It may not seem as a core app, but it definately is one of the most useful contrib apps. It's used by quite a lot of things, and is packed with django, I see no reason to not pack this into the core

Re: Best way to accomplish model inheritance

2006-12-24 Thread favo
Hi Aaron, I know there're two way to use model inheritance with current django. both are not perfect, you could choice what you need. That's say model inheritance is still not a feature of django, but should be one imo. 1. as you said, use OneToOne field class Place(models.Model):

Re: Request data in inclusion tag

2006-12-24 Thread Eugene Pyvovarov
thanks. it works --~--~-~--~~~---~--~~ 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 PROTECT

Re: Virtualhost, Location, access to "root location"

2006-12-24 Thread Osso
Can you try using request.path instead request['PATH_INFO']? This all the conf we use for mod apache. Nothing special. PythonPath "['/home/curse/cursedjango'] + sys.path" PythonHandler django.core.handlers.modpython PythonDebug Off ServerName www.curse-gaming.com ServerAlias curse-gamin

Re: Your Approach to Schema Evolution?

2006-12-24 Thread Ned Batchelder
This is the method I've used in a few projects, and am now using with Django in Tabblo: 1) You add a sequentially-increasing number called the schema number to your code. Any time the models change in a way that changes the db schema, this number is incremented. 2) A table is added to the d

Re: Virtualhost, Location, access to "root location"

2006-12-24 Thread Hans.Rauch
ServerName wow.curse-gaming.com SetHandler mod_python ... and the path info is working right for us. Maybe the problem is somewhere else in the setup? That setup is the Apache2.2 but it was working with Apache2 before. I am using Apache 2.2 too. Maybe it works, since you have cha

Re: Proposed Changes

2006-12-24 Thread [EMAIL PROTECTED]
I disagree completely with the ticket being closed. It may not seem as a core app, but it definately is one of the most useful contrib apps. It's used by quite a lot of things, and is packed with django, I see no reason to not pack this into the core if it's in INSTALLED_APPS On Dec 24, 3:21 am,

Re: need some help with unordered_list

2006-12-24 Thread Osso
Sorry, my bad... who would have thought a simple list wouldn't work with that filter. I've looked at the source then saw your ticket. Example tests: list1 = ['item1'] list2 = ['item1', 'item2'] list3 = [['item1',[]], ['item2', []]] list4 = ['item1', ['item2', []]] list5 = [['item1', ['subitem1'

Re: Memcached Servers Failures

2006-12-24 Thread Osso
It does. The problem is that the socket is in blocking mode so when a server goes down the client waits at the socket.connect for a lot of time and that for each instance of python. Once the connection times out the server is marked as down for 30s, so the client works for 30s then stops again (

Re: need some help with unordered_list

2006-12-24 Thread dummy
Hi Osso, Osso schrieb: On Dec 23, 10:03 pm, [EMAIL PROTECTED] wrote: Hi, I have the following list ['item 1', 'item 2', 'item 3'] and want the following output: item 1 item 2 item 3 Since this is not in the example for unordered_list I don't know how I can get this right. Is it possible