Re: Why I'm giving up on Django

2006-09-28 Thread James Bennett
On 9/28/06, Sean Schertell <[EMAIL PROTECTED]> wrote: > (1) The clean modular apps aren't totally decoupled because they > still have to use the project's template directory and css (which > makes sense perhaps but complicates things for what I'm trying to > achieve). No, they don't.

Re: settings

2006-09-28 Thread Graham Dumpleton
Malcolm Tredinnick wrote: > > On a side not, why can't django detect that I have modified a file and > > reload it, much better than running in a beta mode. > > Not entirely sure what you mean here. The development server can detect > this. You can configure mod-python to do so, too, although

Re: Why I'm giving up on Django

2006-09-28 Thread Don Arbow
On Sep 28, 2006, at 6:26 PM, Sean Schertell wrote: > > (2) This is a biggie for me. I can't believe that the authentication > module forces you to use hard coded urls for login/logout pages -- > that's just maddening! So if you want to do it your own way, you have > to totally roll your own

Re: Confused about generic.create_update

2006-09-28 Thread gkelly
It's funny. Everyone I ask about this problem says to use the other type of Field (either OneToOne or ForeignKey). I have tried both. See this thread for my problems with OneToOne: http://groups.google.com/group/django-users/browse_thread/thread/9789d5e4bf24a4c3/ I just recently upgraded from

Re: explicit array access in django templates

2006-09-28 Thread falcon
Don, First of all I have to admit that I was testing with jinja templates, which are supposed to be based on django (i wanted to run into just these kinds of limits before setting up django). Unfortunately I don't know hwo many columns my table will have, I want a generic solution which requires

Re: Why I'm giving up on Django

2006-09-28 Thread Kenneth Gonsalves
On 29-Sep-06, at 6:56 AM, Sean Schertell wrote: > But I'm very sorry to say that one by one, all of these things turned > out to be not so great after all. Here's what I found after six weeks > of struggling to build a site in Django that would have taken a week > or so in PHP all the 7 points

Re: Why I'm giving up on Django

2006-09-28 Thread Malcolm Tredinnick
On Fri, 2006-09-29 at 10:26 +0900, Sean Schertell wrote: > Hi Guys, > > I just wanted to share with the community my personal experience with > Django in the hopes that maybe some of my petty gripes might be > somehow helpful. Before doing that, I have to thank everyone in the > community

Re: Why I'm giving up on Django

2006-09-28 Thread Adrian Holovaty
On 9/28/06, Sean Schertell <[EMAIL PROTECTED]> wrote: > So at the end of the day, my experience with Django started off with > a *lot* of excitement. I was thrilled because it seemed I'd found > something that met my needs exactly. But in actual usage, I found > that using django to build a

Re: settings

2006-09-28 Thread Malcolm Tredinnick
On Fri, 2006-09-29 at 02:24 +0100, Henrik Vendelbo - Fashion Content wrote: > Ouch 20 mins into trying out Django and the water is getting too hot. > > Where am I supposed to put my things such as mysite.settings? > > I run on FC5 and installed the Django egg. I thought it would be a good idea

Why I'm giving up on Django

2006-09-28 Thread Sean Schertell
Hi Guys, I just wanted to share with the community my personal experience with Django in the hopes that maybe some of my petty gripes might be somehow helpful. Before doing that, I have to thank everyone in the community for being so helpful and just so damn nice! Thanks so much to all

settings

2006-09-28 Thread Henrik Vendelbo - Fashion Content
Ouch 20 mins into trying out Django and the water is getting too hot. Where am I supposed to put my things such as mysite.settings? I run on FC5 and installed the Django egg. I thought it would be a good idea to put all my stuff in /opt/test-site, but apparently I can't use absolute path when

Re: changing models

2006-09-28 Thread Malcolm Tredinnick
On Thu, 2006-09-28 at 16:59 +0200, Carlo Caponi wrote: > hi, > this is my model: > > class Poll(models.Model): > question=models.CharField(maxlength=200) > > If i run './manage.py syncdb' it creates tables on db. Now i populate > tables with something. > > Now, if i change the model: >

Re: Django & Jitsu Combination - Help Needed

2006-09-28 Thread Malcolm Tredinnick
On Wed, 2006-09-27 at 17:07 +, mmohen wrote: > Hi, > > We would like to use jitsu as a client GUI and Django as a backend. we > wish to know that is it possible this combination will work out or is > there any issues to be solved. As far as I can recall, nobody has ever mentioned this

Preventing Multiple Submits

2006-09-28 Thread Ian Maurer
Just wondering if anyone has thought through the problem of multiple submits due to multiple clicks of a submit button? I am already properly using POSTs and GETs and doing a redirect after a POST, as recommeded by the Django docs. The issue I am talking about is when a user clicks the submit

Re: authentication/access control for static files

2006-09-28 Thread Bedros Hanounik
thanks, that's exactly what I'm looking for.On 9/28/06, Ivan Sagalaev <[EMAIL PROTECTED] > wrote:Bedros Hanounik wrote:> thanks for the quick response; that should work for me for now (low > traffic); but I wonder how it scales with high traffic site. Also, any> idea how this may apply to

Re: How tune fastcgi for django?

2006-09-28 Thread Malcolm Tredinnick
On Thu, 2006-09-28 at 16:21 -0700, mamcxyz wrote: > The fork error is not in lighttpd, is when I login with SSH console... Which confirms it has nothing to do with the max-procs parameter. You have other system level problems going on. Regards, Malcolm

Re: Confused about generic.create_update

2006-09-28 Thread Malcolm Tredinnick
On Thu, 2006-09-28 at 17:08 +, gkelly wrote: > Can a ForeignKey be a primary key? Possibly not. > I'm getting the following error. > > Here is the relevant part of the model: > > class UserProfile(models.Model): > user = models.ForeignKey(User, primary_key=True, >

acts_as_list?

2006-09-28 Thread Paul Barry
Does django has something like the rails ActiveRecord acts_as_list? For those who don't know what acts_as_list is, it gives you the api for dealing with an ordered list of objects. For example, think if was modeling a book. I would have a Book object with a one to of a simple Netflix queue.

Re: Project level template tags?

2006-09-28 Thread Ivan Sagalaev
zenx wrote: > Hi, > I was wondering if it was possible to create project level template > tags that can be called by any app template. Create an app specially for such tags, name it like "common_tags", include it in INSTALLED_APPS and then you can use those tags throughout the project using {%

Re: How tune fastcgi for django?

2006-09-28 Thread mamcxyz
The fork error is not in lighttpd, is when I login with SSH console... --~--~-~--~~~---~--~~ 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

Re: Re: authentication/access control for static files

2006-09-28 Thread James Bennett
On 9/28/06, Bedros Hanounik <[EMAIL PROTECTED]> wrote: > thanks for the quick response; that should work for me for now (low > traffic); but I wonder how it scales with high traffic site. Also, any idea > how this may apply to lighttpd. The PythonAuthenHandler directive used to make this work is

Re: authentication/access control for static files

2006-09-28 Thread Bedros Hanounik
thanks for the quick response; that should work for me for now (low traffic); but I wonder how it scales with high traffic site. Also, any idea how this may apply to lighttpd. On 9/28/06, James Bennett <[EMAIL PROTECTED]> wrote: On 9/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:> for

Re: authentication/access control for static files

2006-09-28 Thread James Bennett
On 9/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > for example, I have a dynamic page created, which has a url pointing to > a static file on another server. Django provides a mechanism for extending Apache's own authentication to check against the Django user database, but this requires

Re: explicit array access in django templates

2006-09-28 Thread Don Arbow
On Sep 28, 2006, at 7:08 AM, falcon wrote: > > Let's say I have two arrays: > data=[["a",1,9],["b",2,8],["c",3,7],["d",4,6],["e",5,5]] > type=['string','number','number] > > I iterate through the 'data' array (either with 'for' or 'range' > loops) > and render a with values from the array. >

Re: How to join 2 QuerySets? (with QuerySet object in result)

2006-09-28 Thread Joe
Are the news and articles using the same fields? if so, you can do some custom SQL like this (warning: hack follows): News.objects.extras([ ' WHERE [...] UNION (SELECT * FROM ARTICLES WHERE [...] )' ]) --~--~-~--~~~---~--~~ You received this message because

authentication/access control for static files

2006-09-28 Thread [EMAIL PROTECTED]
I'm planning to play with django and I am totally a django noob. my question is how can I set access control of static files on a separate server. for example, I have a dynamic page created, which has a url pointing to a static file on another server. if I have access to both servers; how can

Project level template tags?

2006-09-28 Thread zenx
Hi, I was wondering if it was possible to create project level template tags that can be called by any app template. Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Django & Jitsu Combination - Help Needed

2006-09-28 Thread mmohen
Hi, We would like to use jitsu as a client GUI and Django as a backend. we wish to know that is it possible this combination will work out or is there any issues to be solved. Thanks M Mohen --~--~-~--~~~---~--~~ You received this message because you are

Django session at Pune Python meet on 30th September

2006-09-28 Thread Sandy
Pune Python meet organized by PythonThreads.com is scheduled on 30th September. The main purpose of the meet is to introduce Django to Python web framework developers and encourage them to use it in their daily tasks. Amitabh Jain will speak on Django. In the IndicThreads.com Java meet, Amol Raje

Django + FCGI on 1and1 shared hosting

2006-09-28 Thread Ivan Manolov
I was able to get Django to work with FCGI but the problem I'm running into is that I get a 500 Error randomly on every few requests. I downloaded a copy of the application and ran it using mod_python. Everything seems to be fine. Here is what my django.fcgi and .htaccess files look like:

Re: Confused about generic.create_update

2006-09-28 Thread gkelly
Can a ForeignKey be a primary key? I'm getting the following error. Here is the relevant part of the model: class UserProfile(models.Model): user = models.ForeignKey(User, primary_key=True, edit_inline=models.STACKED, num_in_admin=1,min_num_in_admin=1,

Re: Confused about generic.create_update

2006-09-28 Thread gkelly
Thanks for looking into this more. What you said makes sense, and I was almost on my way to that conclusion. Specifying primary_key=True is probably what I need. I'll give it a try. Thanks, Grant --~--~-~--~~~---~--~~ You received this message because you are

Re: Confused: staff / active users

2006-09-28 Thread Enrico
Hi Russel, As I said, in my tests an inactive user with staff status could log into the admin, but had no permissions even if he's a superuser. I think he shouldn't be able to log in at all, instead of logging in and being able to do nothing. In the admin, he can't see nothing, but in other

Re: "slice" xhtml content and keep it valid xhtml?

2006-09-28 Thread Adrian Holovaty
On 9/27/06, Gábor Farkas <[EMAIL PROTECTED]> wrote: > or perhaps, is there some library, that "fixes" invalid (x)html? This is only tangentially related, but if the other suggestions in this thread haven't helped, you can always fall back on HTML Tidy: http://tidy.sourceforge.net/ . It will fix

Re: Djangonauts at the hack day?

2006-09-28 Thread Adrian Holovaty
On 9/28/06, Sandro <[EMAIL PROTECTED]> wrote: > Woah! In response to Adrian's "make us proud" comment I whipped up a > django shirt to wear during the hackday. Check it here > http://flickr.com/photos/untorn/254672411/ > I'm going to try to get photographed as much as possible with this > thing

Re: Model-level DB cache

2006-09-28 Thread Michael Radziej
Greg Plesur schrieb: > So that's a work-around that I can use, but...is it okay behavior? That > seems pretty broken. Is it possible that Django's DB connection has > auto-commit off, but explicitly calls COMMIT internally on save() > operations when there's no Django-level transaction in

Re: changing models

2006-09-28 Thread can xiang
I think you'd change the schema manually. You can take a look at the "manage.py sql appname" output for the sql statement. Carlo Caponi 写道: > hi, > this is my model: > > class Poll(models.Model): > question=models.CharField(maxlength=200) > > If i run './manage.py syncdb' it creates

Re: Model-level DB cache

2006-09-28 Thread Greg Plesur
That does fix it - thanks Michael. I just want to summarize what I'm seeing, though, in case it helps others: - In no place, either in my MySQL shell or my Python Django session, am I explicitly starting a transaction. Further, my MySQL shell has auto_commit on. - If I make a change in

changing models

2006-09-28 Thread Carlo Caponi
hi, this is my model: class Poll(models.Model): question=models.CharField(maxlength=200) If i run './manage.py syncdb' it creates tables on db. Now i populate tables with something. Now, if i change the model: class Poll(models.Model): question=models.CharField(maxlength=200)

explicit array access in django templates

2006-09-28 Thread falcon
Let's say I have two arrays: data=[["a",1,9],["b",2,8],["c",3,7],["d",4,6],["e",5,5]] type=['string','number','number] I iterate through the 'data' array (either with 'for' or 'range' loops) and render a with values from the array. ... range rownumber from 0 to sizeOfData ... range

Re: Re: Confused: staff / active users

2006-09-28 Thread Russell Keith-Magee
On 9/28/06, Enrico <[EMAIL PROTECTED]> wrote: > > Hi Waylan, > > Thanks for your help, the fog has gone now. :) Just to further Waylan's comments: The purpose of 'is_active' is to identify an 'active' user - that is, a user whose account can still be used to log in. This is an alternative to

Re: Admin CSS: Broken INTERNAL link

2006-09-28 Thread Enrico
Sorry guys! I think this didn't solve the error for me. I keep getting this error: Referrer: http://200.139.115.13/media/admin/css/base.css Requested URL: /error/HTTP_NOT_FOUND.html.var Someone can help me? Thanks in advance. Enrico --~--~-~--~~~---~--~~

Admin CSS: Broken INTERNAL link

2006-09-28 Thread Enrico
Hi, The admin "css/base.css" has a CSS hack to block IE5 which reports me a broken link. Since I don't care about IE5, I just removed the hack: /* Block IE 5 */ @import "null?\"\{"; Maybe some other css hack could be used to avoid an invalid request to the server. Just reporting here in case

Re: Confused: staff / active users

2006-09-28 Thread Enrico
Hi Waylan, Thanks for your help, the fog has gone now. :) Maybe the docs should be a little clearer... Regards. Enrico --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

RE: sorting data on list pages, date validation

2006-09-28 Thread Benedict Verheyen
Hi,   i will have a look at it but for my app it's overkill as there isn't so much data that fetching it over and over again would be a problem.   Regards, Benedict P.S. Sorry for sending the mails 3 times. At work we use exchange and it said it couldn't send the message (can't connect to the

Re: sorting data on list pages, date validation

2006-09-28 Thread charles sibbald
Hi use a _javascript_ widget from softcomplex.com that will recevie data for upto 3000 rows, and allow you to sort and filter on the client side. Its quite amazing.If you have a large amount of data/clients you dont want to be fetching data continuously.

sorting data on a list page, date validator

2006-09-28 Thread Benedict Verheyen
Hi, i have a few questions. 1. In my app, i have a list view where several fields are represented in tables. Now i want the user to be able to click the columnheader in order to sort the data. I have javascript code that displays a + or - wether (toggling between the 2) and i made 2 views, 1

sorting data on list pages, date validator

2006-09-28 Thread Benedict Verheyen
Hi, i have a few questions. 1. In my app, i have a list view where several fields are represented in tables. Now i want the user to be able to click the columnheader in order to sort the data. I have javascript code that displays a + or - wether (toggling between the 2) and i made 2 views, 1

sorting data on list pages, date validation

2006-09-28 Thread Benedict Verheyen
HI, i have a few questions. 1. In my app, i have a list view where several fields are represented in tables. Now i want the user to be able to click the columnheader in order to sort the data. I have javascript code that displays a + or - wether (toggling between the 2) and i made 2 views, 1

Re: How tune fastcgi for django?

2006-09-28 Thread Malcolm Tredinnick
On Mon, 2006-09-25 at 15:17 -0700, mamcxyz wrote: > I have a Centos 3 server with 128 MB of RAM and a limit of 30 > processes... I'm using lighttpd + FastCGI > > When I start the server for first time I get 18 process. > > When later I need to run some change or restart or something, I get a >

Re: date format other than YYYY-MM-DD

2006-09-28 Thread [EMAIL PROTECTED]
It is hard to use it with related objects... Inside a for loop I can´t know which original object to reference (at least with the template language) and if I use the for to loop through the original object instead of the form, I have to use it for all other fields of the form, with no help for

Re: Re: Confused about generic.create_update

2006-09-28 Thread Russell Keith-Magee
On 9/27/06, gkelly <[EMAIL PROTECTED]> wrote: > > > The easiest fix I can think of would be to put a hidden field in your > > form that holds the id of the current user. This will put a 'user' > > entry into your form data, which will allow the create/update generic > > views to submit without

Here's an idea for the Django ninjas...

2006-09-28 Thread Tom Smith
Wouldn't it be nice if I could... >>> python manage.py sync-urls-to-views.py ...and have some output that creates all the functions (with params) called for me... even if only splatted to screen Wouldn't it be nice if if perhaps in reverse I could... >>> python manage.py

Re: Model-level DB cache

2006-09-28 Thread Michael Radziej
Hawkeye schrieb: > I had the same reaction at first... "this has to be a transaction > issue", but I decided to give it a try. > > I'm working from trunk, and here's what I did to recreate the problem: > > == > {{ In manage.py shell }} a = Foo.objects.all() a > [< Foo: Foo 5>,

Re: Windows XP and Django

2006-09-28 Thread [EMAIL PROTECTED]
I was in the same position only two days ago and although I'm still a long way from coding, the framework is starting to make sense in my tiny brain! It's worth looking at some other peoples examples such as - http://www.b-list.org/weblog/2006/09/04/django-tips-documentation-and-resources

Re: Djangonauts at the hack day?

2006-09-28 Thread Sandro
Woah! In response to Adrian's "make us proud" comment I whipped up a django shirt to wear during the hackday. Check it here http://flickr.com/photos/untorn/254672411/ I'm going to try to get photographed as much as possible with this thing on!