Re: Self referencing models initialization

2014-03-13 Thread Erik Cederstrand
Den 13/03/2014 kl. 06.34 skrev Santiago Palacio Gómez : > Hi everyone, > > I'm a Django newbie, and I was following the tutorial for 1.6, creating a new > app where one of the models is self-referencing. They ask to, in manage.py > shell, create an instance of the model. But, as my model has a

Re: django.utils.html.smart_urlquote() is incorrectly unquoting embedded url?

2014-03-13 Thread Md. Enzam Hossain
Ticket filed - https://code.djangoproject.com/ticket/22267#ticket On Wednesday, March 12, 2014 6:03:30 PM UTC, Erik Romijn wrote: > > Hello, > > On 12 Mar 2014, at 17:48, Md. Enzam Hossain > > wrote: > > When we give django.utils.html.smart_urlquote() an url with an already > embedded query as

Best way to implement translations overrides ?

2014-03-13 Thread Alessandro Pasotti
Hi, I'm running a multi-site Django application, with SITE_ID hack to set the correct site on each request based on hostname. I'd like to add per-site translations overrides like this: * middleware set SITE_ID * each SITE_ID can have custom translations stored in a DB table * when _() is called,

Log django database queries using logging

2014-03-13 Thread Anju SB
Dear All, I am a newbie in Django programming. I want to log insert, update, delete and failed select query in my daily log file. I configured 'django.db.backends' in the logger of the Logging dict in Settings.py. But I get all the queries in that application. I need only insert, update,

Django "CSRF cookie not set" question

2014-03-13 Thread Xin Kuo
Hi, I am developing a management system by django 1.6. Using django + wsgi + apache to implement this project, there are some html on the one directory, angularjs $http use "POST" mehtod to visit the django web url to get some data (django web url on the other directory). front end angularj

Re: Gunicor + Postgres + Python 3

2014-03-13 Thread John Deng
Hi, Henrique. Did you config the url.py? 在 2014年3月10日星期一UTC+8下午12时14分18秒,Henrique Oliveira写道: > > Hi there, > > I have set Django + gunicorn + python 3 in a production env, but I am > gettin critical timeout on simple request(home). > Any Ideas? > > 14-03-09 23:11:21 [14029] [INFO] Listening at:

Django Logging database queries

2014-03-13 Thread Anju SB
Dear All, I am a newbie in Django programming and developing a web application using django 1.3 and postgresql. I want to log insert, update, delete and failed select queries in my daily log file. I configured 'django.db.backends' in the logger of the Logging dict in Settings.py. But I get

Re: Self referencing models initialization

2014-03-13 Thread Santiago Palacio Gómez
Ok, just did that and it worked (had to delete and re-create the db). Thank you very much for your quick reply. One last question though, just for curiosity, is there no way to create such cyclic relationships? If so, how? El jueves, 13 de marzo de 2014 03:41:05 UTC-5, Erik Cederstrand escribi

Re: Self referencing models initialization

2014-03-13 Thread Shawn Milochik
On Thu, Mar 13, 2014 at 1:07 PM, Santiago Palacio Gómez wrote: > Ok, just did that and it worked (had to delete and re-create the db). > Thank you very much for your quick reply. > > One last question though, just for curiosity, is there no way to create > such cyclic relationships? If so, how? >

Re: Self referencing models initialization

2014-03-13 Thread Santiago Palacio Gómez
I see, nice tip. Thanks! El jueves, 13 de marzo de 2014 12:35:48 UTC-5, Shawn Milochik escribió: > > On Thu, Mar 13, 2014 at 1:07 PM, Santiago Palacio Gómez > > > wrote: > >> Ok, just did that and it worked (had to delete and re-create the db). >> Thank you very much for your quick reply. >> >>

Re: Django not showing css - static files

2014-03-13 Thread Mike Dewhirst
On 14/03/2014 9:05am, Luggaz wrote: Good day, My static files are not showing on production, they show when I run them development mode. I am running Django1.6 on apache,mod_wsgi. I get the not found error on the files. Have you copied all your static files into STATIC_ROOT ?? I have been o

ForeignKey Field does not exist?

2014-03-13 Thread wasingej
I am trying to develop a web interface in Django which manages email lists. In one table, ListEntry, I have entries containing information about lists. In another table, OwnerEntry, I have information about list owners. Each entry in the OwnerEntry table has the username of a list owner, and

Re: ForeignKey Field does not exist?

2014-03-13 Thread Shawn Milochik
On Thu, Mar 13, 2014 at 7:27 PM, wasingej wrote: > > When I go to grab information about the list with 'l = > OwnerEntry(name='wasingej')', intuition would tell me that 'l' would be a > list of entries with the name 'wasingej'. However, when I try to access > the value of 'l.list' django gives me

Re: problem with integrating bootstrap 3.1.1 and django 1.6

2014-03-13 Thread Camilo Torres
On Sunday, March 9, 2014 3:59:02 PM UTC-4:30, rafiee.nima wrote: > > On Sunday, March 9, 2014 10:29:37 PM UTC+3:30, Camilo Torres wrote: >> >> On Sunday, March 9, 2014 12:11:11 PM UTC-4:30, rafiee.nima wrote: >>> >>> I am new to bootstarp and I want to use it in my django project. >>> I put the ne

Re: Log django database queries using logging

2014-03-13 Thread Russell Keith-Magee
Hi Anju, Firstly - if you want to filter log messages that meet a specific criterion, you can install a filter into your logging configuration. Python and Django's logging documentation both contain sections about filtering: http://docs.python.org/2/library/logging.html#filter-objects https://doc

Re: Documentation of modules

2014-03-13 Thread Camilo Torres
Hello, I don't know of the existence of that reference documentation. You can try the source code documentation: https://github.com/django/django On Wednesday, March 12, 2014 4:13:38 AM UTC-4:30, Christian Waterkeyn wrote: > > Thanks. > But this is not reference documentation! > For example, the

Re: Log django database queries using logging

2014-03-13 Thread Anju SB
Thank You Mr. Russell Keith-Magee. I want to log other details regarding the application. So I selected the django logging. LOG_URL = '/var/log/Crime_Mapping/' import logging class CustomQueryFilter(logging.Filter): def filter(self, record): for action in ['INSERT', 'UPDATE',