Re: starting a django project

2014-03-19 Thread Venkatraman S
Are you using any tutorials to get started? Also, is this on Windows or Linux - shouldnt be much different; you might have some PATH issues in certain cases. Also, you haven't mentioned if you got any errors/warnings while starting the project. -Venkat @venkasub On Tu

Re: Moving the focus from the 'Save' button to the 'Save and add another' one

2014-03-19 Thread Venkatraman S
To get you started rather then spoonfeeding you : Have you looked at the code which generates this button? Can you think of possible javascript alterations that you can do to change the focus or order? -V On Sun, Mar 16, 2014 at 1:10 AM, vittorio wrote: > My 1.6.2 django app deals with a ware

Re: Django Logging database queries

2014-03-19 Thread Venkatraman S
INSERT/UPDATE/DELETE/SELECT cover almost all types that will be used. What else is getting logged? And what do you mean by 'FAILED' Select queries? Do you mean Timed-out ones? On Thu, Mar 13, 2014 at 12:32 PM, Anju SB wrote: > Dear All, > > I am a newbie in Django programming and developing a

Re: Using Redis as a DB backend for some models (not a caching backend!)

2014-03-19 Thread Venkatraman S
Good Q. Something along the lines of : https://docs.djangoproject.com/en/dev/topics/db/multi-db/ ? Let us know what you find. On Sat, Mar 15, 2014 at 1:10 AM, Alon Nisser wrote: > Can I use redis as a django database for some of my models? I'm aware (and > using) caching with django and redis,

Re: Review needed

2014-03-19 Thread Venkatraman S
Why do you want to do this! It looks complicated and badly formed. -V On Mon, Mar 3, 2014 at 12:11 AM, Kakar Nyori wrote: > Hello, > This may be long, but I really need your help. I have a class *Asset*, > which is the *base class* of another *classes *(like *Photo, Question, > Video etc.*) Ba

Re: "Beginning Geo Django: Rich Gis Web Applications With Python" Where can I get the book?

2014-03-19 Thread Max Demars
Hi Alex, I cannot help you with this book in particular, but I could suggest another book that helped me a lot. Python Geospatial Development by Erik Westra -Max Demars On Tuesday, March 18, 2014 11:49:49 AM UTC-4, Alex wrote: > > Thats an interesting dilemma. I just looked around a no one has

Re: [GeoDjango] Re: "Beginning Geo Django: Rich Gis Web Applications With Python" Where can I get the book?

2014-03-19 Thread Michael Savarese
That's a good book for all things GIS/Python as well as a GeoDjango example. These links may help out also. They use Leaflet instead of the GeoDjango built-in OpenLayers https://github.com/makinacorpus/django-leaflet http://blog.mathieu-leplatre.info/geodjango-maps-with-le

Re: I am unable to get the choice field to validate on creating users. it doesn't make sense at all.

2014-03-19 Thread Tom Evans
On Wed, Mar 19, 2014 at 3:40 PM, sashank reddy wrote: > Hi, > > I have been trying to extend the UserCreationForm and have a form which > performs user registration and adds email and the names. > In addition I am using a choice field that allows a list down of existing > groups so that you can as

Django Form Wizard - Something wrong?

2014-03-19 Thread BadStorm
Hi, I try to add a wizard in my project. I read the documentation at https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/ and I followed step by step those instructions. The only thing i change is that I added a third step. The problem is: when I try to fill all the fields fo

I am unable to get the choice field to validate on creating users. it doesn't make sense at all.

2014-03-19 Thread sashank reddy
Hi, I have been trying to extend the UserCreationForm and have a form which performs user registration and adds email and the names. In addition I am using a choice field that allows a list down of existing groups so that you can assign the user to an group immediately upon creation. The prob

Re: I am unable to get the choice field to validate on creating users. it doesn't make sense at all.

2014-03-19 Thread sashank reddy
Hi Tom, What do you mean callable? I tried changing desig_group = forms.ChoiceField(choices=choice_desig()) to desig_group = forms.ChoiceField(choices=choice_desig) It gave error 'function' object is not iterable. But I want to know if the following would work. desig = forms.ModelChoiceField(

Re: ImportError: No module named core in django 1.5.5

2014-03-19 Thread Alex Scoble
Never mind on this one. Ended up creating a virtual environment and running django in that and it's working now. Thanks, Alex On Tuesday, March 18, 2014 10:32:01 AM UTC-7, Alex Scoble wrote: > > Hi All, > > Running CentOS 6.4 with python 2.6.6 and django 1.5.5 > > Doing this at prompt works: py

Middleware being called twice for every request, help?

2014-03-19 Thread Tyler Bettilyon
Hello! I recently switched my Django environment from using Apache to Gunicorn. After this switch we noticed that our middleware was being called twice for each request. To confirm my suspicion I wrote a new piece of middleware: class TemporaryMiddleware(object): def process_request(self,

Re: Middleware being called twice for every request, help?

2014-03-19 Thread Nikolas Stevenson-Molnar
Are you making the request from a browser? If so, your browser is probably making an extra request for the favicon. So if your middleware handles /all/ requests (even ones that ultimately result in 404) then it'll be executed twice. It will look like it's twice for one request, but it's actually tw

Re: Middleware being called twice for every request, help?

2014-03-19 Thread Tom Evans
On Wed, Mar 19, 2014 at 5:50 PM, Nikolas Stevenson-Molnar wrote: > Are you making the request from a browser? If so, your browser is probably > making an extra request for the favicon. Two requests that just happened to generate the same random uuid, and skipped all other middleware processing ap

Re: Middleware being called twice for every request, help?

2014-03-19 Thread Xavier Ordoquy
Hi, Just remove the Django debug toolbar. It will call your middlewares to display the result. Regards, Xavier, Linovia. Le 19 mars 2014 à 18:00, Tyler Bettilyon a écrit : > Hello! > > I recently switched my Django environment from using Apache to Gunicorn. > After this switch we noticed tha

Re: Middleware being called twice for every request, help?

2014-03-19 Thread Nikolas Stevenson-Molnar
Ah yes. I missed/ignored the UUIDs entirely! _Nik On 3/19/2014 11:08 AM, Tom Evans wrote: > On Wed, Mar 19, 2014 at 5:50 PM, Nikolas Stevenson-Molnar > wrote: >> Are you making the request from a browser? If so, your browser is probably >> making an extra request for the favicon. > Two requests

Simple User login not working.

2014-03-19 Thread Don Fox
My project has two superusers who have access to the Django Administration and who manually add about 15 Users who should then be able to login and use the site to do data entry. I'm using the standard code in my views *def auth_view(request):* *username = request.POST.get('username',' ')*

error: 'module' object has no attribute '_handlerList'

2014-03-19 Thread Sergey R
i started to get 500 error when loading the site traceback shows: Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_

submit buttons in django

2014-03-19 Thread Harjot Mann
I have a form in my app and after entering data into that form I submit that form but I want an another submit button like "Submit and Add Event", so that after clicking on it it can redirect to an another form. Please help me that how can I do this? -- Harjot Kaur Mann Blog: http://harjotmann.wo

Foreign key attribute in django

2014-03-19 Thread Harjot Mann
I have a field in my form that is related with foreign key to another form and when I am filling a form that is required field but sometimes I need to leave it blaink, how can I do this? -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy: http://harjotmann.wordpress.com/daily-

Re: installing django trunk

2014-03-19 Thread Malik Rumi
Anybody? A little help here? Just to update, I ran a search for 'migrations' in my django folder, and got a lot of hits, but when I tried to actually run 'makemigrations" I got 'unknown command' On Sat, Mar 15, 2014 at 6:37 PM, Malik Rumi wrote: > First, Dan, thanks for the reply. Second, apolo