Re: mod_wsgi performance problem

2013-01-06 Thread Aaron C. de Bruyn
Without knowing a bit more about your setup it would be difficult to give any meaningful advice. Are you running Apache under Windows or Linux? How much memory is in your machine? Is it a dedicated box, a VPS, or are you testing on your local workstation? What part of your site is running slow?

mod_wsgi performance problem

2013-01-06 Thread Tsolmon Narantsogt
Hi folks, My site is performance very low. I deployed in apache mod_wsgi. How to increase my web site performance. Thanks. -- 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: HTML Source on Browser Rendering

2013-01-06 Thread stayros kroustouris
Hello, maybe any "autoescape" template tags on the wrong spot? On Sun, Jan 6, 2013 at 9:46 PM, Joseph Mutumi wrote: > Hello, > > I think you should also check the 'Content-Type' being received client-side > in the HTTP headers. You can use something curl or Firebug. > > > On Sun, Jan 6, 2013 a

Re: HTML Source on Browser Rendering

2013-01-06 Thread Joseph Mutumi
Hello, I think you should also check the 'Content-Type' being received client-side in the HTTP headers. You can use something curl or Firebug. On Sun, Jan 6, 2013 at 1:40 PM, Ryoichiro Kamiya wrote: > Hi, > > I'm testing Django template rendering in development environment, but one > of the pag

Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-06 Thread Александр Соколов
Hi! Recently I had the same problem and this site has helped me: http://stackoverflow.com/questions/11121819/mysqldb-in-python-cant-connect-to-mysql-server-on-localhost I've set the next properties: 'ENGINE': 'django.db.backends.mysql', 'NAME': 'yourdbname', 'US

Re: InMemoryUploadedFile no `encoding` Attribute

2013-01-06 Thread nkryptic
The InMemoryUloadedFile has the following inheritance: django.core.files.uploadedfile.InMemoryUploadedFile - django.core.files.uploadedfile.UploadedFile --- django.core.files.base.File --django.core.files.utils.FileProxyMixin FileProxyMixin defines a propery "encoding", that simply calls self

HTML Source on Browser Rendering

2013-01-06 Thread Ryoichiro Kamiya
Hi, I'm testing Django template rendering in development environment, but one of the page shows HTML source (after all Django tag executed) instead of HTML. 1. Content Type The first thing I check is the Content Type but it's correctly set up (and it's in header template and shared with other

Re: Help implement CSS into Django!!!!

2013-01-06 Thread Ben Carleton
On Jan 5, 2013, at 9:12 PM, Czaro wrote: > I've been trying to get my CSS to work with my python powered site forever > but I have no luck. I read the djangobook and a massive load of other > resources but they all say a different thing and nothing worked for me. I > would appreciate a few hel

Re: django.conf.urls.defaults is deprecated

2013-01-06 Thread nkryptic
In your urls.py file, you probably have something like: from django.conf.urls.defaults import patterns, url, include change that to: from django.conf.urls import patterns, url, include On Sunday, January 6, 2013 9:57:25 AM UTC-5, Thiago wrote: > > Hello, > > I am having this "DeprecationWarning:

Re: Change label/title from an application added to django admin

2013-01-06 Thread Pedro J. Aramburu
Currently, there isn't a proper way of doing it. I will say that your best choice is to edit the template for the admin "index" and the "app index" so if app_name is "Emp" call it other way. I know it's a dirty hack but currently there is no "standard" application on django so there isn't an ed

django.conf.urls.defaults is deprecated

2013-01-06 Thread Thiago Carvalho D' Ávila
Hello, I am having this "DeprecationWarning: django.conf.urls.defaults is deprecated; use django.conf.urls instead" when I runserver.. but there is no reference to django.conf.urls.defaults. Any hint of what should I do to take it off? Thanks. -- You received this message because you are subscr

Re: Modelforms and class based views

2013-01-06 Thread Pedro J. Aramburu
https://docs.djangoproject.com/en/1.4/topics/forms/modelforms/#model-formsets El domingo, 6 de enero de 2013 11:46:40 UTC-3, Pedro J. Aramburu escribió: > > Have you tried merging the forms with formsets? > https://docs.djangoproject.com/en/1.4/topics/forms/formsets/ > > El viernes, 4 de enero de

Re: Modelforms and class based views

2013-01-06 Thread Pedro J. Aramburu
Have you tried merging the forms with formsets? https://docs.djangoproject.com/en/1.4/topics/forms/formsets/ El viernes, 4 de enero de 2013 13:51:41 UTC-3, Marco A Morales escribió: > > Hi everyone, > > I'm still wraping my head around class based views and I'm trying my first > project with clas

Re: InMemoryUploadedFile no `encoding` Attribute

2013-01-06 Thread Pedro J. Aramburu
I believe that as InMemoryUploadedFile is "InMemory", internally uses a cStringIO as the "container" for the file. So basically the class it's just a wrapper that returns the StringO object, a string representation of the file. You should check for the attributes of StringO or maybe use SimpleU

Re: Can't set static file directory.

2013-01-06 Thread Pedro J. Aramburu
That is in a development server? Why not use ./manage.py runserver? If not you can point apache to the wsgi file and use django itself to serve the static files modifying a little bit urls.py. But it's not recommended for production use. https://docs.djangoproject.com/en/1.4/howto/static-files/

Re: Multiple model inheritance

2013-01-06 Thread nkryptic
yes, yes, no and yes. Abstract models should inherit form models.Model. Abstract models should always have a Meta class with abstract=True. The order matters when it comes to shared functionality. Here's how I would code those models you had: class Taggable(models.Model): tag = models.Ch

Re: Can't set static file directory.

2013-01-06 Thread Pedro J. Aramburu
Because it's configured that way in apache, not in django, and it doesn't exist ergo the error message. El sábado, 5 de enero de 2013 15:38:32 UTC-3, Mārtiņš Jakubovičs escribió: > > Hello. > > I try a lot of things and can't understand, why not working STATIC_ROOT > and MEDIA_ROOT in settings.p

Re: Help implement CSS into Django!!!!

2013-01-06 Thread Pedro J. Aramburu
Czaro, to better understand the problem it will be good if you could tell us something more about how are you calling your css files from your templates and where are they located. I will also assume Django 1.4 to tell you some tips (mostly already covered). - Set your STATIC_ROOT. I use

Re: Can't set static file directory.

2013-01-06 Thread Abraham Yusuf
On Sunday 06 January 2013 11:49:46 AM django-users@googlegroups.com wrote: When i set in STATIC_ROOT = '/home/domain/www/my_proj/htdocs/static' In apache error log i got: File does not exist: /home/domain/www/my_proj/my_proj/static I don't get, why django don't want to take new setting..

Re: Help implement CSS into Django!!!!

2013-01-06 Thread Abraham Yusuf
On Sunday 06 January 2013 11:49:46 AM django-users@googlegroups.com wrote: Czaro Jan 05 06:12PM -0800 I've been trying to get my CSS to work with my python powered site forever but I have no luck. I read the djangobook and a massive load of other resources but they all say a different thing

Re: how to create a databse

2013-01-06 Thread ANKIT BAGARIA
fixed it. thankyou so much. On 6 January 2013 04:33, Subodh Nijsure wrote: > On Ubuntu following works - > > Run: > sudo dpkg-reconfigure mysql-server-5.1 > > Now this will allow you set password for 'root' user. > > Les assume you want to create user joe and create database joedb , wan

OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-06 Thread ANKIT BAGARIA
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'django', # Or path to database file if using sqlite3. 'USER': 'name', # Not used with sqlit