Re: Easy way to make all form fields read only?

2012-10-31 Thread Elena Williams
I was also going to suggest using crispy forms -- having used it on a recent project I'd strongly recommend it (it's great when it's plugged in to existing stylings such as: uni-form or bootstrap). I've used it with ModelForm using Layout() and Field() and it works a treat. --- Elena :) @elequ 0

Re: Easy way to make all form fields read only?

2012-10-31 Thread Paul
I used to invest something similar; i wanted to to built a read view next to an update view that looks identical except for that read is obviously read-only. I used crispy-forms to do just that; recently an UneditableField (Layout) was added next to Field. You do however either need to enumerate

Re: Help me choose OS for django server

2012-10-31 Thread Christophe Pettus
On Oct 31, 2012, at 12:41 PM, Javier Guerra Giraldez wrote: > maybe, maybe not. the point is that H.264 is not free, not gratis, > not open. If you are streaming H.264-encoded video free to end users, you don't have to pay fees, and will never have to: http://www.mpegla.com/Lists/MP

Re: Problem with formset

2012-10-31 Thread Lachlan Musicman
On Thu, Nov 1, 2012 at 7:30 AM, Satinderpal Singh wrote: > I use formset in my views.py file for the forms. It saves the entries from > the form to the database but the problem is that it shows all the previous > forms along with the new form for the new entry. The code for my views file > is give

Re: Help me choose OS for django server

2012-10-31 Thread Javier Guerra Giraldez
On Wed, Oct 31, 2012 at 2:17 PM, Chris Pagnutti wrote: > Hi Waitman, > > Do you mean that if I stream mp4 videos from my site, I have to pay someone > royalties? maybe, maybe not. the point is that H.264 is not free, not gratis, not open. but there's a "free of charge" use-case as a gift from

Re: Help me choose OS for django server

2012-10-31 Thread Chris Pagnutti
Hi Waitman, Do you mean that if I stream mp4 videos from my site, I have to pay someone royalties? On Tuesday, October 30, 2012 3:50:30 PM UTC-4, Chris Pagnutti wrote: > > Hi. I want to set up a production server for a django application. > constant.com offers Virtual Private Servers which

models.DecimalField with value 0 shows up as "0E-8" in admin forms by default. Is there a workaround?

2012-10-31 Thread Ben Roberts
I created a ticket for this, since it really doesn't seem right for a Decimal field to be using E notation in forms, but just for zeros. We use django admin as a client-facing backend, so we need to make it user friendly. I have a model with

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread David Fischer
Django does strict referrer checking[1] which includes checking the scheme (HTTP vs. HTTPS). Like the others, I suggest you serve the whole site over HTTPS and forward HTTP traffic to the appropriate HTTPS URLs. -David [1] https://docs.djangoproject.com/en/1.4/ref/contrib/csrf/#how-it-works [1

Re: getting data from a dictionary in a view

2012-10-31 Thread MikeKJ
On Wednesday, October 31, 2012 1:54:07 PM UTC, MikeKJ wrote: > > > Solved using > http://www.daniweb.com/software-development/python/code/217019/search-a-python-dictionary-both-waysby > Ene > Uran , thanks > -- You received this message because

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread Kevin Veroneau
I am using analytics. Hmm. I hoped that there was a django setting I may have missed somewhere. I'll tackle it in a few hours and post my findings and/or solution to help others with a similar issue. If there are any other suggestions as well I'm open to more ideas. On Oct 31, 2012 10:08 AM, "k

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread kahara
Perhaps this could be fixed by simply redirecting all HTTP requests to HTTPS? Also, if you're using Analytics and your visitor comes in from an encrypted (Google) search page, then your Analytics will fail as the referer header will not contain search terms if the search hit is non-HTTPS.

Re: Django/South/MySQL bug

2012-10-31 Thread Tom Evans
PEBKAC. The query has unescaped '%' symbols in it, which causes the query to fail. This is not reported, and instead it dies trying to log the query in connection.queries. I'm sorry to waste your time, should have single-stepped it before emailing in. I was clearly using a different query to test

Re: Django/South/MySQL bug

2012-10-31 Thread Andrew Godwin
Hmm, I'm not sure why issuing a query previously isn't fixing it - South just uses the same database cursors that the rest of Django uses, it's one of the few things we don't mess around with. Surely Django has to have some code to deal with the case when there isn't that attribute already? Have y

Django/South/MySQL bug

2012-10-31 Thread Tom Evans
Hi all I've just run into a slight problem with Django 1.4.1, south 0.7.6 and py-MySQLdb 1.2.3. In the fix for Django bug #14091, Django will now always look at cursor._last_executed in order to get details of the last query executed, which I guess is for managing connection.queries in debug mode

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread jirka . vejrazka
Hi there, I'm sorry I don't have a solution for you. However I have a warning/recommendation. Even if you don't serve the full site over https, you should make sure that forms that submit data over HTTPS are served over HTTPS. Otherwise you make it difficult for users to verify that their

Re: getting data from a dictionary in a view

2012-10-31 Thread MikeKJ
Solved using http://www.daniweb.com/software-development/python/code/217019/search-a-python-dictionary-both-ways by Ene Uran , thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread Kevin Veroneau
I did this approach before and it seems to break Google Search results. :( I do want users to use the site and find me easily after all. On Oct 31, 2012 6:24 AM, "Mike Dewhirst" wrote: > On 31/10/2012 7:21pm, Kevin wrote: > >> Hello everyone, >> >>I am in the process of deploying a Django app

Re: Help me choose OS for django server

2012-10-31 Thread Waitman Gobble
On Tue, Oct 30, 2012 at 7:39 PM, Chris Pagnutti wrote: > Yeah. Hosting the videos ourselves was one of the primary requirements > for this project. > > > On Tuesday, October 30, 2012 3:50:30 PM UTC-4, Chris Pagnutti wrote: > >> Hi. I want to set up a production server for a django application. >

getting data from a dictionary in a view

2012-10-31 Thread MikeKJ
I want to interrogate a dictionary for a particular text cursor = connection.cursor() cursor.execute("SELECT distinct feature, featuredetails from features where the_id = %s", [id]) feature = dictfetchall(cursor) results in [{'featuredetails': u'', 'feature': u'TV_SET'}, {'featur

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread Mike Dewhirst
On 31/10/2012 7:21pm, Kevin wrote: Hello everyone, I am in the process of deploying a Django app which works both on HTTP and HTTPS connections, and require that some specific forms only submit via HTTPS. I want the transition process over to HTTPS to be seamless for the end-user. I am impl

Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread Kevin
Hello everyone, I am in the process of deploying a Django app which works both on HTTP and HTTPS connections, and require that some specific forms only submit via HTTPS. I want the transition process over to HTTPS to be seamless for the end-user. I am implementing this on a site-wide login

compiler

2012-10-31 Thread Markus Christen
Good Morning I have downloaded files, that can helps by my mssql-odbc connection. This is my downloaded file: http://code.google.com/p/django-pyodbc/source/browse/trunk/sql_server/pyodbc/compiler.py?r=190 On lines 188 and 273, i become the message "'return' outside of function". It's not a spac