Re: mod_python Error After mysqlhotcopy --help!!!

2006-02-25 Thread Jacob Kaplan-Moss
[EMAIL PROTECTED] wrote: > As for a I know, all I did was use mysqlhotcopy to backup some data and > now my whole site is down. > > Are there any issues with this? > > This site is supposed to go live in 24hrs. Wow, that sounds terrible -- I'm so sorry! There's nothing in Django that would cause

mod_python Error After mysqlhotcopy --help!!!

2006-02-25 Thread [EMAIL PROTECTED]
Hi All, As for a I know, all I did was use mysqlhotcopy to backup some data and now my whole site is down. Are there any issues with this? This site is supposed to go live in 24hrs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Django versions

2006-02-25 Thread ChaosKCW
True, but I have found it forces me to look at django code more, which helps me learn it more. Guess its not for everyone. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Naming conventions in docs / tutorials

2006-02-25 Thread Glenn Tenney
On Sat, Feb 25, 2006 at 06:18:20PM +, Luke Plant wrote: > 'Site' in that example was a model in my own app -- there is a Django > model of the same name, but I don't know that much about it. As I've been learning Django this past week, this type of naming issue has bitten me over and over and

Re: Django versions

2006-02-25 Thread Glenn Tenney
On Fri, Feb 24, 2006 at 01:04:31PM -, ChaosKCW wrote: > So if your starting from scratch like > me, and your willilng to put up with a few bugs, the magic removal is > the way to go. The problem I see with the m-r path for a newbie is that all the docs, tutorials, and examples are pre-m-r ..

Re: django problem at dreamhost

2006-02-25 Thread Bryant
I have what I think is a similar problem - first time posting here so please, be gentle. I followed the instructions on the Django on Dreamhost wiki and correctly installed django. Everything seems to work fine... database tables are as expected... then I try to access mydomain.com/admin or mydom

Re: Magic-removal roadmap?

2006-02-25 Thread Tom Tobin
On 2/25/06, Nicholas Matsakis <[EMAIL PROTECTED]> wrote: > > > Is there a (rough) timeframe set out for when the magic-removal branch > will be merged into the trunk? Will there be a Django release before that > which will incorporate all the improvements aside from the magic removal? > I'm not lo

Primary key with db_column set results in errors in admin

2006-02-25 Thread Kirk McDonald
I posted a ticket about and a fix for this here: http://code.djangoproject.com/ticket/1394 In short, if you have a model whose primary key has the db_column option set to something other than the name of the attribute, the admin gets terribly confused (spits out a ProgrammingError) when y

Magic-removal roadmap?

2006-02-25 Thread Nicholas Matsakis
Is there a (rough) timeframe set out for when the magic-removal branch will be merged into the trunk? Will there be a Django release before that which will incorporate all the improvements aside from the magic removal? I'm not looking for exact dates, just where these events are likely to ha

Enjoy this funny video

2006-02-25 Thread students
Take a moment to watch funny vidoe ofthe day at http://www.loltime.com. they have one new video everyday. So feel free to check it atleast once everyday. Also check out http://www.studentshangout.com ..a complete site with everything for you --~--~-~--~~~---~--~

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Hi Thanks for your responses. Thats what I thought, just wanted to make sure. The all() just seems unitutive to me, but given that Djangos syntax is so easy, a little bit of something here and there is no biggie. Thanks again. PS I just posted a patch for the generic views on the developers lis

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-25 Thread Wilson
If you don't want to set the section variable in your template context you can also do something similar by just defining a new block to contain your section id. Something like this: [...] etc... --~--~-~--~~~---~--~~ You received this message because you are

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 18:25, ChaosKCW wrote: > A dumb question, but will objects.all() cause any kind of performance > hit ? > > I mean when the code appends QuerySet.filter(pk=object_id), will it > condense that to a SQL statement that returns one object or reutrn > all obejcts then do th

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
A dumb question, but will objects.all() cause any kind of performance hit ? I mean when the code appends QuerySet.filter(pk=object_id), will it condense that to a SQL statement that returns one object or reutrn all obejcts then do the PK query ? Thanks, --~--~-~--~~~--

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 17:43, ChaosKCW wrote: > Just one question, I have used model.objects, not > model.objects.all(). It appears to work and makes more sense to me. > Any comments? Use model.objects.all() (at least for now). model.objects will work in some cases, but perhaps not in oth

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 17:47, ChaosKCW wrote: > Hi > > Is there some documentation on the "Sites" functionality. I have seen > it, but not seen any docs ? 'Site' in that example was a model in my own app -- there is a Django model of the same name, but I don't know that much about it. Luk

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Hi Is there some documentation on the "Sites" functionality. I have seen it, but not seen any docs ? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Magic-Removal Branch Wiki Updated for generic view parameters

2006-02-25 Thread ChaosKCW
Hi I have updated the Magic Removal Branch Wiki with information on using Querysets and generic views. Thanks, C --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Thanks, I had a look at the code and worked that out. Just one question, I have used model.objects, not model.objects.all(). It appears to work and makes more sense to me. Any comments? Thanks, Stephen --~--~-~--~~~---~--~~ You received this message because yo

Re: Help with Generic Views in Magic Removal Branch

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 16:58, ChaosKCW wrote: > Please can someone help. I am following Tutorial4 for generic views, > plus adapting it to the magic removal instructions on the wiki page. > As far as I can tell i followed the instructions exactly, But I get > an error stating that 'model' i

Re: ORDER BY on get_object?

2006-02-25 Thread Adrian Holovaty
As of revision 2392 in trunk, I've made this change. ORDER BY is no longer added for get_object() queries, unless you explicitly specify it. Thanks again for suggesting, Ned! Adrian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: ORDER BY on get_object?

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 14:33, Ned Batchelder wrote: > If I omit the ordered attribute, then there is no ORDER BY clause. > Surely the code that knows to omit the clause entirely in that case > could be triggered in the single-object case? I know, it's foolish to > ever guess at the structur

Help with Generic Views in Magic Removal Branch

2006-02-25 Thread ChaosKCW
Hi Please can someone help. I am following Tutorial4 for generic views, plus adapting it to the magic removal instructions on the wiki page. As far as I can tell i followed the instructions exactly, But I get an error stating that 'model' is not a valid paremeter to the view. I am sure its somth

Re: ORDER BY on get_object?

2006-02-25 Thread Adrian Holovaty
On 2/25/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > If I specify an 'ordering' attribute in my model's META class, it gets > used even for single-object selects, for example, get_object. > > So there are SQL queries like this: > > SELECT field, field FROM app_model WHERE id = 50 ORDER BY date

Re: Template IF statement with <,>,<=,>= (or equvalent)

2006-02-25 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: >Django Template engine seems to be very strate forward yet powerful, >however I can't for the life of me figure out how to check if variable1 >is greater then or smaller then variable2. > > You can't. Django's philosophy is that this is logic is probably a small part

Re: Template

2006-02-25 Thread akaihola
It would be easier to give advice if we could see the whole story and not only details. Could you express in clear terms what you are trying to achieve? But to get started: To test if page.title == "menu": {% ifequal page.title "menu" %} {% endifequal %} To retrieve objects from the database,

Re: ORDER BY on get_object?

2006-02-25 Thread Ned Batchelder
No, I'm sure the database is not slowed by this.  There's only a single record, so even if it bothered to "sort" it, it would sort quickly. But it seems sloppy, and feeds into fears about ORMs not being able to do SQL efficiently enough for serious systems. If I omit the ordered attribute, t

Re: ORDER BY on get_object?

2006-02-25 Thread Luke Plant
On Saturday 25 February 2006 14:07, Ned Batchelder wrote: > So there are SQL queries like this: > > SELECT field, field FROM app_model WHERE id = 50 ORDER BY date DESC > > Surely the ORDER BY clause can be omitted? Is the magic-removal > branch already fixing this? Yep, the order by clause coul

ORDER BY on get_object?

2006-02-25 Thread Ned Batchelder
If I specify an 'ordering' attribute in my model's META class, it gets used even for single-object selects, for example, get_object. So there are SQL queries like this: SELECT field, field FROM app_model WHERE id = 50 ORDER BY date DESC Surely the ORDER BY clause can be omitted? Is the magic-

Re: Django versions

2006-02-25 Thread Kenneth Gonsalves
On Saturday 25 Feb 2006 6:44 am, oggie rob wrote: > If you plan to deploy anytime in the next month or two (yes, this > is a real possibility with Django!), month or two? you mean there are people out there who take up to a *month* to deploy a django app?? -- regards kg http://www.livejournal

Template

2006-02-25 Thread Mary Adel
i need to say in the template this but i don't know how: i want to say if page.title =menu so the output will be page.content as i need to retreive from the database the content of the page that has title called menu and this is in my template can anyone help --~--~-~--~~

Re: Web Services

2006-02-25 Thread ChaosKCW
Thanks for the all the posts, I will look into them all thouraghly. Might take some time as this is a sapre time project :-) Thanks again, S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: edit_inline & raw_id_admin

2006-02-25 Thread patrick k
the code i posted was fine. i just had to restart the server. patrick > > On Fri, 2006-02-24 at 15:43 +0100, va:patrick.kranzlmueller wrote: >> first think, then write -> problem solved! > > Since you are unlikely to be the only person to ever come across this > problem, how about posting you