Re: problems using django on lighttpd with fastcig

2007-06-04 Thread Kelvin Nicholson
On Mon, 2007-06-04 at 07:01 -0700, jordi.f wrote: > On Jun 2, 3:06 am, Justin Bronn <[EMAIL PROTECTED]> wrote: > > I believe this might be your problem. When using lighttpd the > > ordering of the server modules is important and 'mod_fastcgi' _must_ > > be the last module loaded. > But not

Re: use of save_FOO_file

2007-06-04 Thread Ulf Dambacher
Hi Franchesco There is a patch for newforms using the fileInput widget correctly. there you can find it: When the browser has presented it's File dialog and the form is submitted with a file selected, the raw contents of the file is appended to the post request (you have to set the encoding

syncdb fails for auth and other "built-in" apps

2007-06-04 Thread Psamathos
Hi, I'm trying to run syncdb for my site, but for some reason it doesn't work anymore ( it used to work though ). I've tried to check the models but I can't see anything wrong and the error-message isn't really clear for me. It does however work on my server. They're both using python 2.5.1,

newforms, manytomany, default value.

2007-06-04 Thread larry
Complete django novice here. I've been able to produce a nice form interface using newforms and various examples. I've run into what I believe may be a common problem with saving many-to-many relationships (of which I have quite a few on the one form) when the user is submitting a new record.

Re: Relationships in Models across apps in the same project

2007-06-04 Thread Branton Davis
Hey, I've been doing the Django thing for a few months and only recently have felt less noobish. Of course, I was learning Python as I went along too. Anyhow, I'm glad it worked. Also check out http://www.djangosnippets.org/snippets/83/ if you get into django-tagging. Branton

Re: need to know to start learn django

2007-06-04 Thread Justin Lilly
I might suggest something akin to: http://blixtra.org/blog/2006/07/17/top-30-django-tutorials-and-articles/ There is some interesting stuff there. Beyond that? Find something you want to make and do it. I started with a django todo list. I figure if I continue on, it'll be useful in later

Re: redirect with apache getting 2 slashes

2007-06-04 Thread SmileyChris
On Jun 5, 9:38 am, urielka <[EMAIL PROTECTED]> wrote: > i will try that,but how that should matter? I'm guessing that the first one matches the start of your url ending in a slash: Redirect 301 /archive/detail/3 http://www.urielkatz.com/archive/detail/google-gears-orm/ and then it redirects to

Re: need to know to start learn django

2007-06-04 Thread [EMAIL PROTECTED]
On May 23, 1:36 pm, Christian Markwart Hoeppner <[EMAIL PROTECTED]> wrote: > El mié, 23-05-2007 a las 11:46 -0500, Tim Chase escribió: > > > > What i need to know, except python before i start learn django? > > I went onto my first django-powered project without knowing a bit of > python,

Re: apache memory requirement ballparks?

2007-06-04 Thread Graham Dumpleton
On Jun 5, 9:04 am, Andrew <[EMAIL PROTECTED]> wrote: > Maybe a better way of asking this question would be this: > > What's a reasonable memory footprint for each apache child process? The bulk of memory consumption used by the Apache child processes will be from your own application. Thus, run

Re: Relationships in Models across apps in the same project

2007-06-04 Thread marknca
Branton, Just to re-iterate I did say I was a Django noob! You answer worked like a charm. I really appreciate it! I'll check out the django-tagging app shortly. Cheers, Mark PS > I'll have to submit an update request to the documentation to clarify the wording.

Re: dtect changes for many-to-many relation

2007-06-04 Thread sansmojo
Sorry for the double post, but I forgot to mention how I solved it. It's pretty easy to create your own forms in the admin for something like this by using newforms and stealing styles from Django! When I get time, I'm going to write a mini tutorial on how to use newforms to make your own forms

Re: dynamic fields in models

2007-06-04 Thread sansmojo
syncdb will not automatically add new fields in a model. You have to add the new fields to the database yourself. 'python manage.py sql' will give you the new sql statements to recreate your models, and you can pick out the part regarding your new fields. Also, if you don't care about existing

Re: dtect changes for many-to-many relation

2007-06-04 Thread sansmojo
I've been trying something similar to this myself. I can tell you that you can't do it by overriding save. I've also explored using signals with post_save and pre_save, but even they won't work since the ManyToManyField relation is not handled until after all of that. There is talk about a

Re: What is (?u) in r'^tags/(?P[^/]+)/(?u)$'

2007-06-04 Thread sansmojo
The flag doesn't convert the string to unicode. Check out django.utils.encoding.smart_unicode --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Relationships in Models across apps in the same project

2007-06-04 Thread sansmojo
Hey, Mark. I hope I'm not misunderstanding, but importing models from one app to another is no problem. For example, assume Django project is called 'project' and you have two apps named 'people' and another named 'tagging'. In your people/models.py: from django.db import models from

Relationships in Models across apps in the same project

2007-06-04 Thread marknca
I'll start off my fully admitting that I'm a Django noob and there's probably (hopefully!) an easy answer to this one. Problem: I have several apps in the same project. Each of these apps offers tagging of various models. Ideally I would like one Tag model in an app (e.g., a tagging app) that

Re: apache memory requirement ballparks?

2007-06-04 Thread Andrew
Maybe a better way of asking this question would be this: What's a reasonable memory footprint for each apache child process? >From there we can extrapolate request/sec and concurrency to get a rough estimate of the total RAM needs. Obviously if we were buliding our own machine, we'd stock if

dynamic fields in models

2007-06-04 Thread Lic. José M. Rodriguez Bacallao
hi people, I want to do a little thing, I want to add fields dynamically to a model so when I run python manage.py syncdb, those fields get added to the database table, for example: def common_attrs(cls, common): attrs = dir(common) for attr in attrs: if isinstance(

Bush Family Nazi Connections

2007-06-04 Thread [EMAIL PROTECTED]
Bush Family Nazi Connections http://video.google.com/videoplay?docid=3961840602642450187 Matthew 24 End Time Disaters!!! http://video.google.com/videoplay?docid=303204416536528381 __._,_.___ --~--~-~--~~~---~--~~ You received this message because you are

Re: redirect with apache getting 2 slashes

2007-06-04 Thread urielka
i will try that,but how that should matter? --~--~-~--~~~---~--~~ 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,

Re: redirect with apache getting 2 slashes

2007-06-04 Thread SmileyChris
Try change the order of those two Redirects so the second one gets tried first. On Jun 5, 7:17 am, urielka <[EMAIL PROTECTED]> wrote: > i got my blog inwww.urielkatz.comand i got some of my pages index in > google and now i changed the blog to use slugs instead of post id for > post url. > so

Re: What is (?u) in r'^tags/(?P[^/]+)/(?u)$'

2007-06-04 Thread SmileyChris
Oops, getting myself confused now. (?u) is correct. http://docs.python.org/lib/re-syntax.html Ignore my ignorance On Jun 5, 3:55 am, Sam <[EMAIL PROTECTED]> wrote: > Found there : > Non-ASCII Tag Names in > URLshttp://code.google.com/p/django-tagging/wiki/UsefulTips > > I thought it is used

Re: What is (?u) in r'^tags/(?P[^/]+)/(?u)$'

2007-06-04 Thread SmileyChris
That's a spelling mistake. Try '(?:u)' instead On Jun 5, 3:55 am, Sam <[EMAIL PROTECTED]> wrote: > Found there : > Non-ASCII Tag Names in > URLshttp://code.google.com/p/django-tagging/wiki/UsefulTips > > I thought it is used to convert to unicode but it doesn't seem > effective. > > Anyone

Re: ForeignKey with null=True. Options?

2007-06-04 Thread Horst Gutmann
[EMAIL PROTECTED] wrote: > Here is a fantastic Q object extension which does a LEFT OUTER JOIN. > > http://www.djangosnippets.org/snippets/257/ > > This will solve your problems. > > -Doug > Wow, didn't know about the Q-filters before. Looks great. Thank you :-) (Damn, now I have to

Re: ForeignKey with null=True. Options?

2007-06-04 Thread [EMAIL PROTECTED]
Here is a fantastic Q object extension which does a LEFT OUTER JOIN. http://www.djangosnippets.org/snippets/257/ This will solve your problems. -Doug On Jun 4, 4:11 am, Horst Gutmann <[EMAIL PROTECTED]> wrote: > Hi everyone :-) > > I'm currently writing a small app that should store data

Re: redirect with apache getting 2 slashes

2007-06-04 Thread urielka
i did a redirect with a django view but i don`t want this On Jun 4, 9:17 pm, urielka <[EMAIL PROTECTED]> wrote: > i got my blog inwww.urielkatz.comand i got some of my pages index in > google and now i changed the blog to use slugs instead of post id for > post url. > so

redirect with apache getting 2 slashes

2007-06-04 Thread urielka
i got my blog in www.urielkatz.com and i got some of my pages index in google and now i changed the blog to use slugs instead of post id for post url. so this: http://www.urielkatz.com/archive/detail/3/ become to this: http://www.urielkatz.com/archive/detail/google-gears-orm/ but that doesn`t

<< Unbelievable HEART SURGERY =>>>

2007-06-04 Thread Sheela Thaper
*Hello Friends i saw Unbelievable Heart surgery site i am sure you all believe it.* http://100stuff.com/heart-attack/ Please share us some unbelievable things Bye --~--~-~--~~~---~--~~ You received this message because you

"Ultimate Canon Rock" Amazing video-music!!!

2007-06-04 Thread impeto
http://www.youtube.com/watch?v=dMWl_5NujBw it's awasome you must see it!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: newforms unique field(s)

2007-06-04 Thread [EMAIL PROTECTED]
I finally pulled this together and submitted it as a ticket: http://code.djangoproject.com/ticket/4473 -joe On May 22, 9:47 am, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > I thought the same thing. :-) I'll take a whack at wringing it > together and submitting it as a patch, and you can be

Django whizkids wanted.

2007-06-04 Thread [EMAIL PROTECTED]
Hi Guys. I have recently started dabbling in Django, I'm loving the sheer scale of it. A lot less messy than php which I have used before. Basically I am involved in starting a new business, in which the main outlet will be the website. The main features that need to be implemented are:

Re: problem representation

2007-06-04 Thread Joseph Heck
If it's the *same* information, then use a foreign-key relationship. If it's different information, then it needs to be stored separately, and defining that on the models is a good way of doing that. You can shoot yourself in the foot by trying to re-use too much as well as too-little. It is

Re: No module named managers

2007-06-04 Thread Joel Watts
Are you using django-tagging? I had this same issue after updating that repo a couple days ago. The layout of the repo had changed and as a result the app was no longer in my path. I just got rid of the copy of django-tagging I was using and checked it out again following the directions on the

Re: Request specific data in generic views

2007-06-04 Thread Nathaniel Whiteinge
If you're using generic views your templates should already have the `user` object in their context. You should be able to just use {{ user }} to get the current user's username. - whiteinge On Jun 4, 8:51 am, konryd <[EMAIL PROTECTED]> wrote: > Is it possible to send username to the template

Re: problem representation

2007-06-04 Thread Lic. José M. Rodriguez Bacallao
that is repeating a lot of common information about my models, what about DRY, reusing, etc? On 6/4/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > > Maybe a foreign key relationship would work, but you might just > consider adding all those attributes to each model. Unless you think > you'll end

Re: query parameters for search

2007-06-04 Thread Joseph Heck
While it may look ugly, it's actually pretty effective - depending on what you want to enable with search queries overlaid on URL's. If you only had simple (i.e. one word) terms, you could write the query into the URL itself, but I found that using a url like /search/ and then appending on ?q=...

Re: Big app, big db, all users are authenticated

2007-06-04 Thread Joseph Heck
Another thing to keep an eye out for is referencing one model from another - when loading up the choices for something that has > 1000 possible associated objects, then system will take a while to pull all those into place. Setting "raw_admin_id" in the model will help alleviate this, but you

Re: problem representation

2007-06-04 Thread Joseph Heck
Maybe a foreign key relationship would work, but you might just consider adding all those attributes to each model. Unless you think you'll end with really sparse tables, it may be worth it for the simplicity. You wouldn't want to use a one-to-one table for common elements among different

query parameters for search

2007-06-04 Thread Jiri Barton
What is the best way of adding query parameters (aka GET parameters) to a URL? return HttpRedirect(reverse('animal-search') + '?q=%s=%d' % (animal.name, current_page)) seems awkward to me (not to mention escaping the name). How can I avoid creating query parameters manually? Or, should I avoid

Re: Custom Model Field Help

2007-06-04 Thread Sean
> > Additionally I have a strange problem where any time I include this > > custom field in a model, that model no longer appears in the Django > > admin. There doesn't seem to be any errors in the field/model since I > > can use it with out problems from the shell. > > I haven't looked at this

Re: Big app, big db, all users are authenticated

2007-06-04 Thread [EMAIL PROTECTED]
Hi, On Jun 4, 3:48 pm, "and_ltsk" <[EMAIL PROTECTED]> wrote: > 1. 100MB per request - is it normal? not likely. I have apache processes serving a couple of different sites within separate python interpreters and they are all somewhere in the 10-30MB memory range. Common gotcha: make sure you

What is (?u) in r'^tags/(?P[^/]+)/(?u)$'

2007-06-04 Thread Sam
Found there : Non-ASCII Tag Names in URLs http://code.google.com/p/django-tagging/wiki/UsefulTips I thought it is used to convert to unicode but it doesn't seem effective. Anyone knows about other flags ? --~--~-~--~~~---~--~~ You received this message because

Re: adding a drop down selection list

2007-06-04 Thread strelok31
I wanted to see if people have any ideas, I am sorry if I was not very clear in my explanation. My task is to add a drop down selection list to the HTML page and the save the value selected to the MySQL database. I have added a drop down selection list. The problem that I am having right now is

Re: Announcing Flutterbox

2007-06-04 Thread Austin Govella
On 6/4/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Furthermore, I shouldn't be placed in a position where I have to > believe you. You may well have the best of intentions, but people > should _NEVER_ give their password to _ANYONE_ but the website that > the password is for. Encouraging

Re: Announcing Flutterbox

2007-06-04 Thread Doug Van Horn
Have you considered OpenID? I'm no expert but it might provide you with the authentication you're looking for, without having to collect passwords. doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Feature request: Generic add/change features (similar to admin)

2007-06-04 Thread jj
Thanks Russ. I had seen that, but documentation was scarce and I wanted a faster method (no template writing, django admin css and templates are good enough for my app, no need to recode). It took me a little while, but I've now switched completely to to generic::create_object(). Compared to

robots.txt?

2007-06-04 Thread Rob Hudson
What do most people do for a robots.txt file in Django? I set up my website to email me errors and 404s, and I often get a 404 email for the robots.txt. Thanks, Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: robots.txt?

2007-06-04 Thread Artiom Diomin
I mean /static/ is your static files location (images, CSS, JS, etc...) KpoH пишет: > You can "mod_rewrite" /robots.txt to /static/robots.txt for example > > Rob Hudson пишет: > >> What do most people do for a robots.txt file in Django? >> >> I set up my website to email me errors and 404s,

Re: robots.txt?

2007-06-04 Thread KpoH
You can "mod_rewrite" /robots.txt to /static/robots.txt for example Rob Hudson пишет: > What do most people do for a robots.txt file in Django? > > I set up my website to email me errors and 404s, and I often get a 404 > email for the robots.txt. > > Thanks, > Rob > -- Artiom Diomin,

Re: how to select from a huge set of data?

2007-06-04 Thread Doug Van Horn
On Jun 4, 5:56 am, Ulf Dambacher <[EMAIL PROTECTED]> wrote: > Am Mittwoch, 2. Mai 2007 20:02 schrieb Ulf Dambacher:> Hi > > > I need some kind of widget which can narrow the select by using > > cateogries. But how can this be done in django? > > > Java? Sorry... > > > Ideas, Anyone ? > >

problem representation

2007-06-04 Thread Lic. José M. Rodriguez Bacallao
Hi for everyone. I'm stuck with django, I want to represent this situation: I have a lot of content types like, news, images, urls, etc. All of them have common attributres like creation date, expiration date, publication date, title and so on. The problem is how to represent this with django

Request specific data in generic views

2007-06-04 Thread konryd
Is it possible to send username to the template using generic views? My site needs to display "hello " but otherwise isn't more complicated than just trivial object_list. I read about serving a callable object to generic view in extra_content, but I'm not sure whether I can get request object

Re: problems using django on lighttpd with fastcig

2007-06-04 Thread jordi.f
On Jun 2, 3:06 am, Justin Bronn <[EMAIL PROTECTED]> wrote: > I believe this might be your problem. When using lighttpd the > ordering of the server modules is important and 'mod_fastcgi' _must_ > be the last module loaded. Hey Justin, where do you learned this? I can't find it on the official

Big app, big db, all users are authenticated

2007-06-04 Thread and_ltsk
Hello all, Some performance tips required. About: Centos 4.4 PIV 2.4 4GB mem Django 0.97 PosrgreSQL db 100+ tables, all connected by pyramidal foreignkey architecture One big models.py 500KB One big views.py 2200KB

Re: Sitemaps and large sites

2007-06-04 Thread jordi.f
On May 22, 10:16 pm, John DeRosa <[EMAIL PROTECTED]> wrote: > Eh, I don't know why this became a reply to an existing thread. Because you did a 'reply' to Mark Phillips last email. You should post a **new** mail after reading this: http://en.wikipedia.org/wiki/Thread_hijacking -- jordi.f

Re: Add a css file into the admin zone

2007-06-04 Thread jordi.f
sansmojo's suggestion works perfectly, but I prefer doing this on the 'admin/base_site.html' template. It's shorter and easier to modify. -- jordi.f --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Query-light retrieval of generic relations

2007-06-04 Thread Jonathan Buchanan
Hi all, I'm trying to write a utility method to retrieve generically related content (the particular model I'm using has the standard ContentType FK, object id and GenericFK) without ending up with one database hit per object: http://dpaste.com/11633/ from

Re: Can someone explain custom managers to me? (model methods vs. custom mgr. methods)

2007-06-04 Thread arthur debert
It took me a while to understand manager better a little bit too. Managers are pretty useful when you have a specific query / queryset that will be common case, and it's more convenient to place that query on one place and avoid repeating yourself. For example, suppose you have a blogging app

Re: Very large scale sites in Django

2007-06-04 Thread Daniel Ellison
On Sunday 03 June 2007 08:22:10 Tim Chase wrote: > Just as a side note, I believe Akami does geographic cache > controlling in addition to simply caching out of a central > location (as do several other big names in the caching business). > This means that users in, say, China, hit the cache

Re: how to select from a huge set of data?

2007-06-04 Thread Ulf Dambacher
Am Mittwoch, 2. Mai 2007 20:02 schrieb Ulf Dambacher: > Hi > > I need some kind of widget which can narrow the select by using > cateogries. But how can this be done in django? > > Java? Sorry... > > Ideas, Anyone ? Apparently no on e had one. So I created a CategoriezedModelSelectField, see

policy for including javascript in django source tree?

2007-06-04 Thread Ulf Dambacher
Hi everybody I just filled ticke 4467 for a CategorizedModelChoiceField wich includes some ajax functionality with javascript and some free glue code (http.request) from openjspan.org. Ubernostrum does not like this additional code. And I think others want to use javascript too and maybe

Re: Announcing Flutterbox

2007-06-04 Thread Russell Keith-Magee
On 6/4/07, Sam Willis <[EMAIL PROTECTED]> wrote: > > Eric, > > For each website you are a member of you need to verify that you are > in fact the user that owns that account. If this process wasn't there > then some one could impersonate another user. For digg and a few > others the method to

newforms-admin custom templates for admin sites

2007-06-04 Thread Glin
Hi, I've just started to use newforms-admin branch and I like "admin sites" feature, so I can have different admin sites. However I run into one problem: How to specify different templates for different admin sites? For example I want to have different header (in index template) or different

Weird 404 errors

2007-06-04 Thread orestis
Hello, I have recently published my humble blog on http://orestis.gr I get a stream of weird 404 errors in my email inbox, but for the life of me I can't figure out what's wrong. Here are some examples: >Referrer: http://orestis.gr/en/blog/2007/05/06/international-part1/ >Requested URL:

Re: apache memory requirement ballparks?

2007-06-04 Thread James Bennett
On 6/4/07, Andrew <[EMAIL PROTECTED]> wrote: > What are some ballpark memory figures (memory vs requests/sec or > concurrent connections) for people running django on Apache prefork w/ > mod_python? Would, say, 150 requests/sec for a 2GB memory allocation > seem reasonable? As always: it

Re: apache memory requirement ballparks?

2007-06-04 Thread James Aylett
On Mon, Jun 04, 2007 at 09:19:05AM -, Andrew wrote: > What are some ballpark memory figures (memory vs requests/sec or > concurrent connections) for people running django on Apache prefork w/ > mod_python? Would, say, 150 requests/sec for a 2GB memory allocation > seem reasonable? I can't

hi

2007-06-04 Thread fantazicİ
güzel bir grup beklerim bayanlar seviyeden ödün vermeden fantazilerinizi paylasabileceginiz bir grup http://groups.google.com.tr/group/fantazici --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

apache memory requirement ballparks?

2007-06-04 Thread Andrew
Hi all: Forgive me if this has been asked before. We're looking to upgrade our hosting server I'm trying to get a sense of how much RAM we should be looking at (considering that's our bottleneck). What are some ballpark memory figures (memory vs requests/sec or concurrent connections) for

Re: ForeignKey with null=True. Options?

2007-06-04 Thread Horst Gutmann
Malcolm Tredinnick wrote: > On Mon, 2007-06-04 at 10:11 +0200, Horst Gutmann wrote: >> Hi everyone :-) >> >> I'm currently writing a small app that should store data for registered >> users and guests alike in one single model. So I made following model >> (simplied) >> >>class

Re: Announcing Flutterbox

2007-06-04 Thread Sam Willis
Eric, For each website you are a member of you need to verify that you are in fact the user that owns that account. If this process wasn't there then some one could impersonate another user. For digg and a few others the method to verify is currently to enter your username and password. The

Re: ForeignKey with null=True. Options?

2007-06-04 Thread Malcolm Tredinnick
On Mon, 2007-06-04 at 10:11 +0200, Horst Gutmann wrote: > Hi everyone :-) > > I'm currently writing a small app that should store data for registered > users and guests alike in one single model. So I made following model > (simplied) > >class Content(models.Model): > user =

ForeignKey with null=True. Options?

2007-06-04 Thread Horst Gutmann
Hi everyone :-) I'm currently writing a small app that should store data for registered users and guests alike in one single model. So I made following model (simplied) class Content(models.Model): user = models.ForeignKey(User, null=True, blank=True) The problem I now face is, that

Re: Generic views: how to use them properly?

2007-06-04 Thread Michael Radziej
On Fri, Jun 01, Sacher Khoudari wrote: > can I add a book to an author? I mean, how do I call > "django.views.generic.create_update.object_create" with "model=Book", > and pass it the value for it's foreign key? You're right, generic views are quite limited. And they work only with "oldforms",