Webservice return pdf

2012-05-28 Thread Madhu
Hi! all I create client & through client i call the web service. which returns pdf file, i want to stored that file directly. I use this response['Content-Disposition'] = 'attachment; filename= 'demo.pdf' but it will ask the user to store the file, but i want to store it automatically on server. c

Re: Tutorial database problem

2012-05-28 Thread Gelonida N
On 05/27/2012 05:38 AM, phantom21 wrote: I've tried to set up the database as sqlite3. I keep getting an error on the ENGINE line, but can't figure out why as it looks correct. Here is the database section: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3',

a problem when PATH_INFO == SCRIPT_NAME

2012-05-28 Thread heng zhao
I'm using Django-1.4 and nginx with fastcgi mode. when I use runserver mode everything goes well, But in nginx & fastcgi ,whatever URL i visit, I get a response "/" I trace the code and found that , when PATH_INFO == SCRIPT_NAME, path_info has been set to u'/' (core/handlers/wsgi.py WSGIRequest

Re: a problem when PATH_INFO == SCRIPT_NAME

2012-05-28 Thread heng zhao
I read the comment in https://code.djangoproject.com/ticket/8490, I found someone met the same problem 3years ago. why don't merge it into chunk? On Mon, May 28, 2012 at 2:56 PM, heng zhao wrote: > I'm using Django-1.4 and nginx with fastcgi mode. > when I use runserver  mode everything goes we

Re: Is Django Right for Me?

2012-05-28 Thread yati sagade
Hi As per a previous answer, Django is a server side framework, and should handle most of your use cases. But you're on your own with the offline caching thing. You have to build some logic in the client side of the app. If I were you, I would have created a RESTful API using django-piston (a Djang

New library released: django-unaccent, adding unaccent operators to the Django ORM for unaccented search in PostgreSQL

2012-05-28 Thread djcoin [Simon Thépot]
Hi all, the subject says it all: i'm glad (and relieved !) to contribute back to Django by releasing the django-unaccent module: https://github.com/djcoin/django-unaccent/ Basically it enables you (in a properly set up postgreSQL database - with unaccent module installed) to make unaccented searc

Python IDLE

2012-05-28 Thread coded kid
I'm in a big mess now, I've lost my projects due to this errror. I'm on windows, This is how I encounter the problem; I try to edit my settings.py in IDLE. After right clicking on the files, I choose open program with these default file. I choose idle window bat file, and I clicked Ok. It didn't op

Re: track change

2012-05-28 Thread Carsten Jantzen
Thank you I like this concept and will try to do it this way. Thanks for the input. /Carsten On May 25, 12:05 pm, bruno desthuilliers wrote: > On May 24, 11:00 pm, Carsten Jantzen wrote: > > > > > Not sure what you mean by detecting skill change using properties, I > > havn't looked into that

Re: Python IDLE

2012-05-28 Thread Andre Terra
For one thing, I don't know of anybody who uses IDLE as their editor for writing complex code like when developing a website with Django. You can always type 'python manage.py runserver' instead of just 'manage.py runserver' to make sure python is the program that's opening your .py file. It seem

Multiprocess Queryset memory consumption increase (DEBUG=False and using iterator)

2012-05-28 Thread pc
I am stumped. I am trying process a lot of data (2 million records and up) and once I have a QuerySet, I immediately feed it to a queryset_iterator that fetched results in chunks of 1000 rows each. I use MySQL and the DB server is on another machine (so I don't think it is MySQL caching). I kick o

Django Models Foreign Key Issue!

2012-05-28 Thread Eugene NGONTANG
I encountered a problem using Django foreign key unique_together for one of my models. I have three models (representing three tables in the database), host, user, and job. - user has a host foreign key - job has a user foreign key and a host foreign key : Because we can have the same user on two

Re: Python IDLE

2012-05-28 Thread yati sagade
After you've fixed your file extension association problems as outlined in the previous answer, PLEASE do not use IDLE to do anything remotely close to editing. Go search for "Notepad++", download it and use it to always edit your Python files. To get the contents of the file into IDLE for testing,

Taggit fragmentation (open letter)

2012-05-28 Thread Simon Bächler
I was just checking on github if there was a new version of django-taggit and was quite shocked what I saw. The original repository had not been updated for over a year. Yet there are 41 issues and 12 pull requests. There are 114 forks, 17 of which had commits within the last month. Shortly, i

Re: django-registration simple backend help

2012-05-28 Thread psychok7
anyone? On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote: > > hi there i am writing an app using django-registration 0.8 installed from > pip and using the simple-backend > > my problem is, when i register a new user it logs me in after inserting in > the db and redirects me to /users//

Re: django-registration simple backend help

2012-05-28 Thread Rafael Durán Castañeda
El 28/05/12 20:18, psychok7 escribió: anyone? On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote: hi there i am writing an app using django-registration 0.8 installed from pip and using the simple-backend my problem is, when i register a new user it logs me in after inser

Re: django-registration simple backend help

2012-05-28 Thread psychok7
yes i read that part before posting, but i just dont understand the beahaviour of the normal login that redirects me somewhere and the login after registration that redirects me elsewhere. wich one should i use? On Monday, May 28, 2012 8:15:28 PM UTC+1, Rafael Durán Castañeda wrote: > > El 28/0

Re: Django GeoIP Module not found; can't remedy

2012-05-28 Thread Thomas Lockhart
... File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/usr/local/lib/libGeoIP.dylib, 6): no suitable image found. Did find: /usr/local/lib/libGeoIP.dylib: mac

Re: Multiprocess Queryset memory consumption increase (DEBUG=False and using iterator)

2012-05-28 Thread akaariai
On May 28, 5:42 pm, pc wrote: > I am stumped. I am trying process a lot of data (2 million records and > up) and once I have a QuerySet, I immediately feed it to a > queryset_iterator that fetched results in chunks of 1000 rows each. I > use MySQL and the DB server is on another machine (so I don'

Set additional conditions for JOIN

2012-05-28 Thread Boris Shemigon
Hi, I wonder is there a way to generate a query with joins with more than one condition? For example: SELECT o.id FROM object JOIN object_value AS ov1 ON ov1.o_id=object.id AND ov1.field_id=1 AND ov1.value=2 JOIN object_value AS ov2 ON ov2.o_id=object.id AND ov2.field_id=2 AND ov2.value>=1 JOI

Re: django-registration simple backend help

2012-05-28 Thread Rafael Durán Castañeda
El 28/05/12 21:28, psychok7 escribió: yes i read that part before posting, but i just dont understand the beahaviour of the normal login that redirects me somewhere and the login after registration that redirects me elsewhere. wich one should i use? On Monday, May 28, 2012 8:15:28 PM UTC+1, R

Re: Set additional conditions for JOIN

2012-05-28 Thread akaariai
On May 28, 10:59 pm, Boris Shemigon wrote: > Hi, > > I wonder is there a way to generate a query with joins with more than one > condition? For example: > > SELECT o.id FROM object > JOIN object_value AS ov1 ON ov1.o_id=object.id AND ov1.field_id=1 AND > ov1.value=2 > JOIN object_value AS ov2 ON o

Re: django-registration simple backend help

2012-05-28 Thread Rafael Durán Castañeda
El 28/05/12 22:13, Rafael Durán Castañeda escribió: El 28/05/12 21:28, psychok7 escribió: yes i read that part before posting, but i just dont understand the beahaviour of the normal login that redirects me somewhere and the login after registration that redirects me elsewhere. wich one should

My first troll

2012-05-28 Thread Antoni Aloy
Hello, Recently I had my first troll on my blog (http://trespams.com). In my blog I usually write about Python and Django, and about the books I read and other IT problems. When I write about Django I tag the posts so it can appear in the Django Planet. My mother language is Catalan, so I usually

Re: Taggit fragmentation (open letter)

2012-05-28 Thread Russell Keith-Magee
Hi Simon, On Tue, May 29, 2012 at 1:39 AM, Simon Bächler wrote: > I was just checking on github if there was a new version of django-taggit > and was quite shocked what I saw. The original repository had not been > updated for over a year. Yet there are 41 issues and 12 pull requests. There > are

Re: django-registration simple backend help

2012-05-28 Thread psychok7
i followed your tips and got my answer here http://stackoverflow.com/questions/3441436/the-next-parameter-redirect-django-contrib-auth-login thanks ;) On Monday, May 28, 2012 9:43:34 PM UTC+1, Rafael Durán Castañeda wrote: > > El 28/05/12 22:13, Rafael Dur�n Casta�eda escribi�: > > El

Re: Tutorial database problem

2012-05-28 Thread phantom21
OK, problem solved. The location I thought was working for django 1.4 was different than was actually the case. I'm reinstalling to a new location and hope it will work correctly this time. The advice on adding the divide by 0 line helped since it didn't execute. Thanks, Mark On May 28, 4:57