Re: Profiling Django

2011-10-12 Thread Andre Terra
A good place to start is using django-debug-toolbar and taking a look at the queries generated for each view, so that you know what's taking long. There are tools for monitoring database performance, but I have no experience with them, so I'll leave it to other members in this list to make the reco

Re: Second coming of Java?

2011-10-12 Thread Russell Keith-Magee
On Thu, Oct 13, 2011 at 4:52 AM, ydjango wrote: > What do you think? > > http://www.cringely.com/2011/10/the-second-coming-of-java/ > > "When SSDs gain enough capacity there will be a shift from the Ruby > world back to the Java world. Not for prototyping, because, well, it’s > prototyping. But si

Re: Ajax replacement in django

2011-10-12 Thread Russell Keith-Magee
A good thing you did. For everyone's benefit -- this kind of language and sentiment *will not* be tolerated on django-users. If you can't keep a civil tongue, you will be asked to leave. Yours, Russ Magee %-) On Wed, Oct 12, 2011 at 11:32 PM, Chandrakant Kumar wrote: > > I am sorry everybody and

Re: configuring

2011-10-12 Thread Kurtis Mullins
If you're sure you've called the MySQLDb correctly in your settings file, as described by the documents, then you may simply be missing the Python-MySQL package. On Wed, Oct 12, 2011 at 5:59 PM, Mike Dewhirst wrote: > Yeah > > The last line of the traceback indicates a problem with your MySQL set

Re: configuring

2011-10-12 Thread Mike Dewhirst
Yeah The last line of the traceback indicates a problem with your MySQL setup possibly with the backend. Check the docs for interfacing Django to MySQL. I use PostgreSQL so I can't help much here. Good luck Mike On 12/10/2011, at 11:12 PM, yezi wrote: > hey everyonei just cant proceed

Re: Second coming of Java?

2011-10-12 Thread Donald Stufft
I think it's a load of tripe. There's plenty ways to speed up Python. And it's fast enough. It's not about being the fastest, but about being fast enough to get the job done, and having an enjoyable experience writing your web application. Java is not that thing. On Wednesday, October 12, 2

Second coming of Java?

2011-10-12 Thread ydjango
What do you think? http://www.cringely.com/2011/10/the-second-coming-of-java/ "When SSDs gain enough capacity there will be a shift from the Ruby world back to the Java world. Not for prototyping, because, well, it’s prototyping. But simply because the statement “Ruby is incredibly slow but I don

Re: Paginator has many Pages, but all are empty?

2011-10-12 Thread Daniel Roseman
On Tuesday, 11 October 2011 17:55:07 UTC+1, ch3ka wrote: > > I have a problem with django.core.paginator. > > I have a Page object who's .object_list is [], but at the same time > it's repr() states "Page 1 of 11". > > How is that even possible? > > Same with page 2, page 3 ,... You'll have t

Re: Why can't "directly" change array elements of model objects in Django shell?

2011-10-12 Thread fei
Instead, you can use the get() function, x = MyModel.objects.get(id=3) x.some_field = "new value" x.save() The difference between all() and get() is that all() will do a lazy evaluation and get() will hit the physical database. Fei On Oct 12, 11:57 pm, Tom Evans wrote: > On Fri, Oct 7, 2011 at

Re: Still getting IntegrityError in test fixture using dumpdata --natural

2011-10-12 Thread bobhaugen
On Oct 12, 9:12 am, Russell Keith-Magee wrote: > --natural isn't a magic wand Dang! I knew that "magic removal" was a bad idea... > Contenttypes are automatically created by syncdb. If your fixtures > *also* contain content types, you can potentially get IntegrityErrors > (because in the proces

Re: Create a modular application

2011-10-12 Thread Javier Guerra Giraldez
On Wed, Oct 12, 2011 at 11:14 AM, Guillaume DE BURE wrote: > Being still quite new to django, I have some very basic questions on this: > * Should each module be         a django app ? Or is it something different ? > * Is there already something existing (a third party app ?) to provide this > ki

Re: Ajax replacement in django

2011-10-12 Thread Micky Hulse
On Wed, Oct 12, 2011 at 9:54 AM, Chandrakant Kumar wrote: > But, isn't HTML5 is still work in progress? I mean, how will it behave on > older browsers? Good point. I guess it depends on the requirements of the project. >From what I read, this sounds like a school project, so why not take the tim

Re: Ajax replacement in django

2011-10-12 Thread Sultan Imanhodjaev
Hello, Did you look at dajax and dajaxice extensions for django so far? It might help. On Oct 12, 2011 10:40 PM, "lankesh87" wrote: > thank you all for your support. > I learnt my lessons. > I have to go back to AJAX. > > Thank you again I really needed your help. > > I guess I'll be hanging aro

Re: Ajax replacement in django

2011-10-12 Thread Chandrakant Kumar
But, isn't HTML5 is still work in progress? I mean, how will it behave on older browsers? On 10/12/2011 10:10 PM, Micky Hulse wrote: On Wed, Oct 12, 2011 at 7:39 AM, lankesh87 wrote: Actually my project guide is asking me to search for ajax replacement in django. So that way we dont have to

Re: Ajax replacement in django

2011-10-12 Thread lankesh87
thank you to all for your support. I learnt my lessons. I have to go back to AJAX. Thanks again for your help. It was much needed. On Oct 12, 8:42 pm, william ratcliff wrote: > I think the OP should ask his manager why they wish to avoid using ajax. > For example, is it sufficient if the page de

Re: Ajax replacement in django

2011-10-12 Thread Micky Hulse
On Wed, Oct 12, 2011 at 7:39 AM, lankesh87 wrote: > Actually my project guide is asking me to search for ajax replacement > in django. So that way we dont have to use ajax. Perhaps it's a trick question? Maybe you project guide does not like the "Ajax" buzzword? :) Just call it XHR:

Re: Ajax replacement in django

2011-10-12 Thread lankesh87
thank you all for your support. I learnt my lessons. I have to go back to AJAX. Thank you again I really needed your help. I guess I'll be hanging around as I am starting to like python and django. On Oct 12, 8:42 pm, william ratcliff wrote: > I think the OP should ask his manager why they wish

Re: Iteration over queryset in a model

2011-10-12 Thread Daniel Roseman
On Tuesday, 11 October 2011 15:17:18 UTC+1, eyscooby wrote: > > slowly getting there thanks to your help. > I am actually trying to accomplish this in the Admin interface, so I > am not sure how to use the template tag {{ ticket.days_old }} in that > situation. > > the other part I left off yes

Create a modular application

2011-10-12 Thread Guillaume DE BURE
Hi people, I just started a new open source project aimed at small companies that would need a tool to manage its resources (http://github.com/myOpenCompany/myOpenCompany not much to see at the moment...), and one of the central idea would be modularization: For example, we will start with an

Re: Ajax replacement in django

2011-10-12 Thread william ratcliff
I think the OP should ask his manager why they wish to avoid using ajax. For example, is it sufficient if the page degrades gracefully for those not running javascript? On Wed, Oct 12, 2011 at 11:40 AM, Tom Evans wrote: > On Wed, Oct 12, 2011 at 3:24 PM, Javier Guerra Giraldez > wrote: > > On We

Re: Ajax replacement in django

2011-10-12 Thread Kurtis Mullins
You could also use Javascript to just hide and display information as you need it. No Ajax involved -- just need to give all of the data to the browser up front. On Wed, Oct 12, 2011 at 11:38 AM, Javier Guerra Giraldez wrote: > On Wed, Oct 12, 2011 at 9:39 AM, lankesh87 wrote: > > I mean if we

Re: Ajax replacement in django

2011-10-12 Thread Tom Evans
On Wed, Oct 12, 2011 at 3:24 PM, Javier Guerra Giraldez wrote: > On Wed, Oct 12, 2011 at 9:17 AM, lankesh87 wrote: >>  I am developing a web application where i need ajax like features. >> But I don't want to use ajax, so my question is- "is there any way to >> perform ajax like functions in djan

Re: Ajax replacement in django

2011-10-12 Thread Javier Guerra Giraldez
On Wed, Oct 12, 2011 at 9:39 AM, lankesh87 wrote: > I mean if we could only refrsh particular part in our web page without > refreshing the whole page "using django". i think you really need to check how HTTP works. in HTTP, the server can't "push" anything to the browser. the browser has to as

Re: Ajax replacement in django

2011-10-12 Thread Brian Schott
This is a bit old-school, but you could do this by using meta-refresh on a frame. I think that should still work in most browsers. http://en.wikipedia.org/wiki/Meta_refresh Basically, you can place an iframe inside your base.html template that includes an link to your dynamic content. htt

Re: Ajax replacement in django

2011-10-12 Thread Chandrakant Kumar
I am sorry everybody and especially lankesh87, I should not have used those words. I had just got into an argument with my dean. Sorry again. On 10/12/2011 08:25 PM, Donald Stufft wrote: I don't think there's any reason to insult anyone, let's be civil. On Wednesday, October 12, 2011 at 10:5

Re: Ajax replacement in django

2011-10-12 Thread lankesh87
As far I can understand from ur opinions is that to load contents without refreshing the web page we will have to use ajax and as python being server side scripting language will not be helpful in this case. So anyhow I will have to use ajax.. do correct me if i'm wrong.. once again thank u all f

Re: Ajax replacement in django

2011-10-12 Thread Phang Mulianto
but for the web html standart you need ajax. maybe you can use some javascript framework like prototype+scripatoulus or jquery to simply work with ajax and browser compatibility issue. On Oct 12, 2011 10:55 PM, "Donald Stufft" wrote: > I don't think there's any reason to insult anyone, let's be

Re: Ajax replacement in django

2011-10-12 Thread Donald Stufft
I don't think there's any reason to insult anyone, let's be civil. On Wednesday, October 12, 2011 at 10:50 AM, Chandrakant Kumar wrote: > > You are another 'garbage' product of our country's shitty education system. > > On 10/12/2011 08:09 PM, lankesh87 wrote: > > Actually my project guide i

Re: Ajax replacement in django

2011-10-12 Thread Markus Gattol
If you don't want to do AJAX but still need to have a bidirectional link between client and server then websockets is probably what you want. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://grou

Re: Ajax replacement in django

2011-10-12 Thread Chandrakant Kumar
You are another 'garbage' product of our country's shitty education system. On 10/12/2011 08:09 PM, lankesh87 wrote: Actually my project guide is asking me to search for ajax replacement in django. So that way we dont have to use ajax. I mean if we could only refrsh particular part in our web

Re: Ajax replacement in django

2011-10-12 Thread lankesh87
Actually my project guide is asking me to search for ajax replacement in django. So that way we dont have to use ajax. I mean if we could only refrsh particular part in our web page without refreshing the whole page "using django". Thanx in advance and pardone me for my foolish questions as i am

Re: Ajax replacement in django

2011-10-12 Thread Javier Guerra Giraldez
On Wed, Oct 12, 2011 at 9:17 AM, lankesh87 wrote: >  I am developing a web application where i need ajax like features. > But I don't want to use ajax, so my question is- "is there any way to > perform ajax like functions in django?" that kind of specifications (ajax-like but no ajax) sound very

Ajax replacement in django

2011-10-12 Thread lankesh87
Hello, I am developing a web application where i need ajax like features. But I don't want to use ajax, so my question is- "is there any way to perform ajax like functions in django?" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Profiling Django

2011-10-12 Thread michael.pimmer.ext
The django application I am working on is very slow on the server-side, and I want to know why. The essence is to identify which code-parts of processing one request take most time. The app runs with mod_wsgi on Apache, here is what I tried: - django-timelog: the information logged is too unspeci

Re: Still getting IntegrityError in test fixture using dumpdata --natural

2011-10-12 Thread Russell Keith-Magee
On Wed, Oct 12, 2011 at 3:05 AM, bobhaugen wrote: > Replying to myself:  temporary fix for dumpdata: --exclude > contenttypes --exclude auth.permission This isn't a temporary fix -- it's the *actual* fix. > The result now works as a test fixture. > > Not sure what to conclude: > * the fix for is

Re: django and unicode

2011-10-12 Thread Elim Qiu
Thanks refreegrata. I know PostgreSQL is a good RDBMS, but tough on encoding... I'll start django with MySQL. By doing this, mysql shell cannot do much data manipulation already... In php, utf8 tables is not enough. Every time connect to mysql database, you need to say mysql_query("SET character_

django-markitup MARKITUP_FILTER configuration

2011-10-12 Thread Э . Мягмаржав
How to set MARKITUP_FILTER setting? and how to render MarkupField() to html template with Bold,Italic, Underline -- 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 unsubsc

configuring

2011-10-12 Thread yezi
hey everyonei just cant proceed my work with django application because some running errors on configuring mysql and the django frame work.if u please get me a solution i will be honored to receive. i kinda of get an error message C:\Django-1.3\newproject\djangoblog>python manage.py

Re: django and unicode

2011-10-12 Thread refreegrata
For example in PostgreSQL, at least from the 8.3 version, you can't have, in the same server, databases with differents encoding. But can be defined a client_encoding for any database. With this you can have a database with encoding='latin1' and client_encoding='utf8'. In postgresql the client_enco

RE: Alternative to the .using() method

2011-10-12 Thread Sells, Fred
Thanks, is exactly what I need. -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Jacob Kaplan-Moss Sent: Tuesday, October 11, 2011 5:36 PM To: django-users@googlegroups.com Subject: Re: Alternative to the .using() method On Tue, O

Re: Why can't "directly" change array elements of model objects in Django shell?

2011-10-12 Thread Tom Evans
On Fri, Oct 7, 2011 at 10:01 PM, Chris Seberino wrote: > > > On Oct 7, 10:39 am, Jacob Kaplan-Moss wrote: >> On Fri, Oct 7, 2011 at 10:30 AM, Chris Seberino wrote: >> >> > I've noticed that this doesn't often work in Django shell... >> >> > x = MyModel.objects.all() >> > x[3].some_field = "new v

Re: Easy question (I hope)

2011-10-12 Thread Tom Evans
On Fri, Oct 7, 2011 at 4:25 PM, Shawn Milochik wrote: > On Fri, Oct 7, 2011 at 11:15 AM, Tom Evans wrote: >> >> I do this a lot, and haven't found any problems with doing so. My main >> app has no models.py, but has models/{__init__,foo}.py, and it is >> still found quite happily by syncdb, south

Re: Easy question (I hope)

2011-10-12 Thread Tom Evans
On Fri, Oct 7, 2011 at 8:31 PM, Oscar Carballal wrote: > I was watching this thread for a while now, and I've got a question. > > What is the reason to split the models.py file? I mean, I'm currently > working on a django project, and the models are pretty "simple" (I > usually split them into app