Re: Django meetup in San Francisco this Thursday?

2006-12-18 Thread Eric Walstad
Adrian Holovaty wrote: > Hello to any Bay Area Django folks out there -- > > I'll be in San Francisco later this week. Anybody interested in having > a Django meetup Thursday night? > > Adrian > Adrian, You might also consider broadcasting this to the BayPiggies group. There are a Django

Re: Re: django and dojo, what is the status ?

2006-12-18 Thread James Bennett
On 12/18/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > At one point, I thought about using Dojo for some improvements in Django's > admin interface; this would have meant such an inclusion. To make a long > story short... it didn't really work :) Yeah, and my short-lived attempt to port

Re: django and dojo, what is the status ?

2006-12-18 Thread Jacob Kaplan-Moss
On 12/18/06 6:18 PM, [EMAIL PROTECTED] wrote: > I would say it does make a difference. If a lead developer wanted to do > it and found it didn't work, I would rather not to spend the effort as > I would assume there must be some technical difficulties. > > It won't change anything about whether

Re: Generic relations in admin proposal

2006-12-18 Thread Jacob Kaplan-Moss
On 12/18/06 6:24 PM, zenx wrote: > After finding a good solution for generic relations in admin: > http://net-x.org/weblog/2006/nov/29/django-generic-relations-made-easier/ > > I think that it should be implemented in the admin app of the django > development version. > > What do you think

Re: Django meetup in San Francisco this Thursday?

2006-12-18 Thread Steve Hutton
On 2006-12-18, Eric Walstad <[EMAIL PROTECTED]> wrote: > > Adrian Holovaty wrote: >> Hello to any Bay Area Django folks out there -- >> >> I'll be in San Francisco later this week. Anybody interested in having >> a Django meetup Thursday night? >> >> Adrian > > Ooh, a meetup would be awesome.

Re: "Decimal not JSON serializable"?

2006-12-18 Thread DavidA
JHeasly wrote: > Hello all, > > I'm following the "Serializing Django objects" documentation and have a > view pretty much verbatim from the docs: > > def my_json_view(request): > data = serializers.serialize("json", Location.objects.all()) > return HttpResponse(data,

Re: Re: Templates for unknown object types

2006-12-18 Thread Crispin Bennett
> > It's not a particularly bad idea; having an object carry with it > standardized information which tells you what template to use to > display it would be pretty easy (assuming, of course, that you have > the ability to lay out the model classes to support that). > Fortunately my models make

Re: serialization question

2006-12-18 Thread Deryck Hodge
On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I use a generic detail view to show user info. I want to also be able > to return that info via ajax, but I'm having trouble getting ALL the > user stuff. Here's the view: > > def view_profile(request, slug, js=''): > from

Re: Django meetup in San Francisco this Thursday?

2006-12-18 Thread Glenn Tenney
On Mon, Dec 18, 2006 at 11:29:18AM -0600, Adrian Holovaty wrote: > I'll be in San Francisco later this week. Anybody interested in having > a Django meetup Thursday night? I know that a couple of us on the Peninsula (between SF and San Jose) would like to get together if we can... Are you

auto_now_add problems

2006-12-18 Thread Milton Waddams
Hi All, I've been noticing some strange behaviour with auto_now_add and date related functions and wasn't able to find anything about it. My server is set to CST as is my settings.py, the majority of the time it works correctly, however sometimes it uses a date which I can't workout why it

serialization question

2006-12-18 Thread [EMAIL PROTECTED]
I use a generic detail view to show user info. I want to also be able to return that info via ajax, but I'm having trouble getting ALL the user stuff. Here's the view: def view_profile(request, slug, js=''): from django.views.generic.list_detail import object_detail auth_user =

Generic relations in admin proposal

2006-12-18 Thread zenx
Hi, After finding a good solution for generic relations in admin: http://net-x.org/weblog/2006/nov/29/django-generic-relations-made-easier/ I think that it should be implemented in the admin app of the django development version. What do you think about it? Want django developers to take the

Re: Re: Templates for unknown object types

2006-12-18 Thread James Bennett
On 12/18/06, Crispin Bennett <[EMAIL PROTECTED]> wrote: > I was primarily wondering whether there's a 'natural' Django idiom or > pattern for doing this kind of thing. My first crude attempt is to > have a method in the model that provides a predictable template name > for the object. Then in my

Re: Re: Templates for unknown object types

2006-12-18 Thread James Bennett
On 12/18/06, Alan Trick <[EMAIL PROTECTED]> wrote: > Actually every class instance has a __str__ method. If it's not > over-ridden, it gets the one inherited from object (which is probably > not what you want, but it's still there). Yeah, what I wanted to get at was that the representation it

Re: Re: Noob: is there a complete library reference somewhere?

2006-12-18 Thread James Bennett
On 12/18/06, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > Is there such a reference somewhere for django? I don't mean > tutorials, usage guides, howtos and such, but a raw listing of > available modules, objects, attributes, etc, with just the bare > minimum text for each to explain what it is.

Re: Templates for unknown object types

2006-12-18 Thread Crispin Bennett
On 12/19/06, James Bennett <[EMAIL PROTECTED]> wrote: > > Even if the types aren't known in advance, it's possible to make some > educated guesses; most classes will, for example, have a __str__ > method which will allow them to intelligently print themselves as > strings. > > If you know what

Re: Noob: is there a complete library reference somewhere?

2006-12-18 Thread James Bennett
On 12/18/06, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > Is there such a reference somewhere for django? I don't mean > tutorials, usage guides, howtos and such, but a raw listing of > available modules, objects, attributes, etc, with just the bare > minimum text for each to explain what it is.

Re: Noob: is there a complete library reference somewhere?

2006-12-18 Thread Waylan Limberg
On 12/18/06, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > > Just starting with django and I'm slightly overwhelmed by the number > of modules, packages, etc. I usually find a complete library reference > very useful when starting to explore a huge software package like > django, for instance the

Re: Get all *_set's from a model?

2006-12-18 Thread Adam Seering
Hey, Thanks!; that's exactly what I was looking for, Adam On 12/13/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > On 12/12/06, Adam Seering <[EMAIL PROTECTED]> wrote: > > > > Hi, > > I know Django keeps track of connections like this somehow, for > the > > *_set

Re: Templates for unknown object types

2006-12-18 Thread Alan Trick
On Mon, 2006-12-18 at 19:57 -0600, James Bennett wrote: > Even if the types aren't known in advance, it's possible to make some > educated guesses; most classes will, for example, have a __str__ > method which will allow them to intelligently print themselves as > strings. Actually every class

Re: Templates for unknown object types

2006-12-18 Thread James Bennett
On 12/18/06, Crispin Bennett <[EMAIL PROTECTED]> wrote: > Is there a natural way in Django to write a template that can display > the details of objects of various types, where the types aren't > necessarily known in advance? Even if the types aren't known in advance, it's possible to make some

Re: Templates for unknown object types

2006-12-18 Thread limodou
On 12/19/06, Crispin Bennett <[EMAIL PROTECTED]> wrote: > > Is there a natural way in Django to write a template that can display > the details of objects of various types, where the types aren't > necessarily known in advance? > if the objects can be convert to string, or it has __str__ method,

Re: django and dojo, what is the status ?

2006-12-18 Thread [EMAIL PROTECTED]
I would say it does make a difference. If a lead developer wanted to do it and found it didn't work, I would rather not to spend the effort as I would assume there must be some technical difficulties. It won't change anything about whether I would use django(that depends on the kind of project,

Re: GenericForeignKey

2006-12-18 Thread zenx
Now it is!! http://net-x.org/media/GenericRelation-0.1.zip Rob Slotboom ha escrito: > > paulh, take a look at > > thishttp://net-x.org/weblog/2006/nov/29/django-generic-relations-made-eas... > > Hi Antoni, > > Seems interesting but the code isn't yet available I suppose... > > Rob

Re: OneToOneField and edit_inline

2006-12-18 Thread Rob Slotboom
Maybe we should create some kind of pressure group for this :-) I don't have any idea who can be consulted for this subject, do you? Cheers, Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Templates for unknown object types

2006-12-18 Thread Crispin Bennett
Is there a natural way in Django to write a template that can display the details of objects of various types, where the types aren't necessarily known in advance? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: urls question django_website

2006-12-18 Thread Rob Slotboom
> I still can't figure out however how the flatfiles are loaded? Or maybe the homepage template from flatfiles is used, without using the content for the flatpage at all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: urls question django_website

2006-12-18 Thread Rob Slotboom
> The 'homepage' is a flatpage with an address of '/'. Hi Kwe, Great help!!! I still can't figure out however how the flatfiles are loaded? For example: http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/flatfiles/homepage.html

Re: generic list view question

2006-12-18 Thread [EMAIL PROTECTED]
Thanks. I said to hell with it and just used the custom view. After hacking it so long, I couldn't remember why I was trying to use a generic view in the first place. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Noob: is there a complete library reference somewhere?

2006-12-18 Thread Daniel Nogradi
Just starting with django and I'm slightly overwhelmed by the number of modules, packages, etc. I usually find a complete library reference very useful when starting to explore a huge software package like django, for instance the way the standard library of python is documented at

Re: urls question django_website

2006-12-18 Thread kwe
Hi Rob, The 'homepage' is a flatpage with an address of '/'. --~--~-~--~~~---~--~~ 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

"Decimal not JSON serializable"?

2006-12-18 Thread JHeasly
Hello all, I'm following the "Serializing Django objects" documentation and have a view pretty much verbatim from the docs: def my_json_view(request): data = serializers.serialize("json", Location.objects.all()) return HttpResponse(data, mimetype='text/javascript') My Location model

Re: OneToOneField and edit_inline

2006-12-18 Thread Dirk Eschler
On Monday 18 December 2006 22:49, Rob Slotboom wrote: > > I'd like to be able to edit Project and News separately with Content > > inline instead. Do you know what i mean? > > Hi Dirk, > > I get the point though I think this will not work. I've tried similar > things when creating a menu, where a

Re: OneToOneField and edit_inline

2006-12-18 Thread Rob Slotboom
> I'd like to be able to edit Project and News separately with Content inline > instead. Do you know what i mean? Hi Dirk, I get the point though I think this will not work. I've tried similar things when creating a menu, where a menu "one to oned" to a poll item or blog entry. I gave up. In

Re: How to hack admin interface?...and should I?

2006-12-18 Thread patrick k.
hmm, I´ve never used a custom manager before. most of the "hacking" stuff we do is about javascript and templates. sorry, but I´m not able to help with this problem. patrick Am 18.12.2006 um 20:09 schrieb Picio: > > Patrick please, can you put an eye also here? > >

Re: Auto-login with REMOTE_USER

2006-12-18 Thread TeLeNiEkO (Marc Fargas)
Hi, You'd maybe like to give a look at #689 [ http://code.djangoproject.com/ticket/689 ] it talks about honouring the REMOTE_USER ;) Cheers, Marc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

urls question django_website

2006-12-18 Thread Rob Slotboom
When I look at the urls.py file belonging to django_website I can't figure out how the website handles the pattern for www.djangoproject.com/ The only option seems to be the included flatpages.urls but this one needs a pattern for an url. Does anybody have a clue? Here is the code:

Re: Wrapping up new site - Django observations

2006-12-18 Thread James Bennett
On 12/18/06, Jeffrey Zelt <[EMAIL PROTECTED]> wrote: > 3. My only serious request involves the DB API. The Django ORM is > simply too limiting. I was not able to do what I wanted without jumping > through hoops. I was forced to use the: Yeah, it's a wart :( There are definitely some

Re: OneToOneField and edit_inline

2006-12-18 Thread Dirk Eschler
On Saturday 16 December 2006 12:07, Rob Slotboom wrote: > Hi Dirk, > I think it's the other way around, try this > > > class Content(models.Model): > title = models.CharField('Title', maxlength=255, core=True) > body = models.TextField('Body text') > > class Admin: > fields =

Re: How to hack admin interface?...and should I?

2006-12-18 Thread Picio
Patrick please, can you put an eye also here? http://paste.e-scribe.com/hold/2728/ I'm trying to show only some rows in an admin results page. Can you help me find the reason whay I can't make It work? In particular no matter if I set a filter in the custom manager 'SoloCurrentUser' It still

Re: Wrapping up new site - Django observations

2006-12-18 Thread Adrian Holovaty
On 12/18/06, Jeffrey Zelt <[EMAIL PROTECTED]> wrote: > 3. My only serious request involves the DB API. The Django ORM is > simply too limiting. I was not able to do what I wanted without jumping > through hoops. I was forced to use the: > > extra( where=..., params=..., tables=...) Hey

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

Re: Wrapping up new site - Django observations

2006-12-18 Thread Jeremy Dunck
On 12/18/06, Jeffrey Zelt <[EMAIL PROTECTED]> wrote: ... > 3. My only serious request involves the DB API. The Django ORM is > simply too limiting. I was not able to do what I wanted without jumping > through hoops. I was forced to use the: > > extra( where=..., params=..., tables=...) >

Re: Wrapping up new site - Django observations

2006-12-18 Thread Istvan Albert
Jeffrey Zelt wrote: > The Django ORM is probably the only piece of Django I am embarrassed > showing other developers. Oh really? > I will not be satisfied if the current ORM is capable of fulfilling 95% > requirements You must be inexperienced if you think that an elegant solution to 95% of

Re: Django meetup in San Francisco this Thursday?

2006-12-18 Thread Eric Walstad
Adrian Holovaty wrote: > Hello to any Bay Area Django folks out there -- > > I'll be in San Francisco later this week. Anybody interested in having > a Django meetup Thursday night? > > Adrian Ooh, a meetup would be awesome. Depending on the time of day (I'm booked through the early evening),

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_detail', (r'^$', 'object_list',

Django meetup in San Francisco this Thursday?

2006-12-18 Thread Adrian Holovaty
Hello to any Bay Area Django folks out there -- I'll be in San Francisco later this week. Anybody interested in having a Django meetup Thursday night? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message

Re: django and dojo, what is the status ?

2006-12-18 Thread Jacob Kaplan-Moss
On 12/18/06 3:11 AM, Russell Keith-Magee wrote: > On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> I googled and found some messages/blogs that dojo is supposed to be >> included in django 0.92 yet I failed to find it in the 0.95 release. > > I don't know where you read that, but

Re: Limiting select_related()

2006-12-18 Thread [EMAIL PROTECTED]
If I knew python better I would have done it already :) On Dec 18, 4:49 pm, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: > On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I'm trying to find a way to tell django "I need these 3 tables, but not > > these 15 tables" from a

Re: Limiting select_related()

2006-12-18 Thread Adrian Holovaty
On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm trying to find a way to tell django "I need these 3 tables, but not > these 15 tables" from a .select_related() query. Any suggestions? There's currently no way to do this. I'd like to add this functionality but don't have time to

Re: Limiting select_related()

2006-12-18 Thread Jeremy Dunck
On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm trying to find a way to tell django "I need these 3 tables, but not > these 15 tables" from a .select_related() query. Any suggestions? I've wanted this, too, but it requires hacking on django.db.models. I'd be happy with a max

Wrapping up new site - Django observations

2006-12-18 Thread Jeffrey Zelt
I just wanted to mention that I am wrapping up a new Django site after 7 months of development. It will be used to manage subscriptions for a magazine published by a Norwegian university. So far it does not have a public interface so I won't give out the link here (all you would see is a

Limiting select_related()

2006-12-18 Thread [EMAIL PROTECTED]
I'm trying to find a way to tell django "I need these 3 tables, but not these 15 tables" from a .select_related() query. Any suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: generic list view question

2006-12-18 Thread [EMAIL PROTECTED]
I can do that for the recent topics (was trying not to, thinking it would be more efficient to handle it in the view), but what about something like last_seen, which is different for each user, as it's calculated from their session: if i.topic_modification_date > request.session['last_seen']:

Re: How to hack admin interface?...and should I?

2006-12-18 Thread Daniel Kvasnicka jr.
> with the last couple of sites we did, we spent more time an "hacking" > the admin-interface than doing the actual site. > Well, that's why I'll probably stick with TurboGears for that project (I already have the admin interface almost implemented). I'll try Django with another app. Thanks for

Re: Curse launches with Django platform

2006-12-18 Thread Jeremy Dunck
On 12/18/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > (Off-list) Well, it was meant to be. :-/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Curse launches with Django platform

2006-12-18 Thread Jeremy Dunck
(Off-list) On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It's runing purely off memcached. We have at least 6 memcached servers, > maybe a few more, and it just updates memcached when the session > updates. This didn't really answer whether volatile session data is OK. Are you

Re: select_related() with the ForeignKey in the same table

2006-12-18 Thread John Lenton
On 12/15/06, leanmeandonothingmachine <[EMAIL PROTECTED]> wrote: > > I have a model where the foreign key refers to it self. > parent = models.ForeignKey('self', core=True, null=True, blank=True) > > What i want to do is to be able to run a query with select_related and > get all the parents of

Re: How to hack admin interface?...and should I?

2006-12-18 Thread Aidas Bendoraitis
Daniel, in your case, I would make the boolean field hidden using DHTML and also add additional "Publish" button using DHTML which would check the hidden checkbox before posting the form. If Javascript is disabled, administrators would see the standard checkbox. Good luck! Aidas Bendoraitis

Re: How to hack admin interface?...and should I?

2006-12-18 Thread patrick k.
Am 18.12.2006 um 11:30 schrieb Kenneth Gonsalves: > > > On 18-Dec-06, at 3:42 PM, [EMAIL PROTECTED] wrote: > >> The admin interface is just that, an interface for administration. If >> you need something beyond that you should keep it outside of it. I >> would give it a thumbs down on trying to

Re: How to hack admin interface?...and should I?

2006-12-18 Thread Kenneth Gonsalves
On 18-Dec-06, at 3:42 PM, [EMAIL PROTECTED] wrote: > The admin interface is just that, an interface for administration. If > you need something beyond that you should keep it outside of it. I > would give it a thumbs down on trying to "hack" the interface, modify > the templates, include pages

Re: ForeignKey 'self', save not working

2006-12-18 Thread Aidas Bendoraitis
You live, you learn. Django database API uses objects, instead of IDs. To access the ID of parent_company, you either access origcompany.parent_company_id or origcompany.parent_company.id. Regards, Aidas Bendoraitis aka Archatas On 12/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >

Re: select_related() with the ForeignKey in the same table

2006-12-18 Thread Aidas Bendoraitis
You can still get all the parents using a cycle: current = Content.objects.select_related().get(pk=3) while current: # do something with the current object, i.e. write to a list # ... current = current.parent # get the parent of the current Good luck! Aidas Bendoraitis aka Archatas

Re: How to hack admin interface?...and should I?

2006-12-18 Thread [EMAIL PROTECTED]
The admin interface is just that, an interface for administration. If you need something beyond that you should keep it outside of it. I would give it a thumbs down on trying to "hack" the interface, modify the templates, include pages that look the same, etc.. it's just too time consuming. My

Re: Curse launches with Django platform

2006-12-18 Thread [EMAIL PROTECTED]
It's runing purely off memcached. We have at least 6 memcached servers, maybe a few more, and it just updates memcached when the session updates. On Dec 18, 4:42 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 12/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > We also redid the

Re: How to hack admin interface?...and should I?

2006-12-18 Thread Daniel Kvasnicka jr.
Thanks for reply, I also wanted to ask how would one implement a "approving mechanism". I have a boolean field which says whether an article has been published or not. And I need to have a "Publish" button with each article entry, available only to admins. Does Django support something like this?

Re: django and dojo, what is the status ?

2006-12-18 Thread [EMAIL PROTECTED]
thanks, this is what I googled which made me confused. http://article.gmane.org/gmane.comp.web.dojo.user/3603 Russell Keith-Magee wrote: > On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I googled and found some messages/blogs that dojo is supposed to be > > included in

Re: django and dojo, what is the status ?

2006-12-18 Thread limodou
On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I googled and found some messages/blogs that dojo is supposed to be > included in django 0.92 yet I failed to find it in the 0.95 release. > > Does anyone know the status of it ? > > regards > > You would find few about ajax bind with

Re: django and dojo, what is the status ?

2006-12-18 Thread Russell Keith-Magee
On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I googled and found some messages/blogs that dojo is supposed to be > included in django 0.92 yet I failed to find it in the 0.95 release. I don't know where you read that, but Dojo is _not_ going to be included in Django. Django is,