Re: Default UserCreationForm and UserChangeForm hard-coded to User; is this required?

2015-01-05 Thread James Schneider
The docs are pretty specific that the forms are only designed to work with the included User model. IMO the rationale behind this is if you plan to substitute your own model, it is likely that you'll break the behavior of the included form, or more likely, it will produce unintended behavior.

Re: Apache and Djagno

2015-01-05 Thread Eddilbert Macharia
hello, next set up n apaches virtual host as i have done above. thats all. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: how can I choose option price from checkbox option and calculate the sum.

2015-01-05 Thread Collin Anderson
Hi, You probably need to use javascript to make the total price auto-update when you check or uncheck each box. Check out jQuery if you haven't. Once you have that, then, yes, you'll want to re-calculate the price in django to be sure it's correct. You could create an Order or Cart model that

Default UserCreationForm and UserChangeForm hard-coded to User; is this required?

2015-01-05 Thread Joel Burton
I'm not sure if this is a bug or intended, hence my asking here before adding to the bug database. In django.contrib.auth.forms, the UserCreationForm and UserChangeForm refer several times to the User model directly, rather than using get_user_model(). This means that when using a different

Re: is there a Django library for AJAX support

2015-01-05 Thread Vijay Khemlani
I don't think Python is the right tool for frontend development. There are entire (and good) frameworks oriented to frontend using JavaScript (such as AngularJS), that also take care of DOM manipulation, handling events, encapsulating ajax requests, etc. On Mon, Jan 5, 2015 at 8:11 PM, Martin

Re: is there a Django library for AJAX support

2015-01-05 Thread Martin Formanko
In the past (2 years ago), when I used dajaxice, it was quite unstable and definitely not robust - it took some time after I understood how to react to different (erroneous) behavior. It would be better that time to code my own library, so that I could understand it more deeply in case of errors

Re: Apache and Djagno

2015-01-05 Thread th . granier
hello i have installed wsgi but i don't know how to use apache instead of the Django's runserver default help!!! Thanks Le samedi 3 janvier 2015 17:45:00 UTC+1, SungHo Park a écrit : > > Hi > I have tried to use Django in Apache, but it doesn't work. > > My Django's version is 1.7.1 so I refered

Re: Not able to update a form in Django after post method

2015-01-05 Thread Vijay Khemlani
For starters, validate the form before getting its data smsPduForm = SmsPduForm(request.POST) if smsPduForm.is_valid(): d = smsPduForm.cleaned_data smsc = d['SMSC'] # etc... regarding the form assignment, I'm not too sure what you're trying to do. ¿Do you want to display the same

Re: Problem with for and if

2015-01-05 Thread Dariusz Mysior
I try develop this code to get a number of position this letter in word, and I have it but for example if i search letter "t" I get "1, 5, b", why I get b instead of 11??? def gen2(): count=0 count2=0 for a in zmienna: count2+=1 if a==szukana: count+=1

Not able to update a form in Django after post method

2015-01-05 Thread rajat shukla
I am trying to update a form field after getting a form in the POST method. When I am trying to update the form I am getting following error Request Method: POST Django Version: 1.6.6 Exception Type: TypeError Exception Value: 'SmsPduForm' object does not support item assignment My Form

Re: Error: No module named polls

2015-01-05 Thread Vijay Khemlani
Also make sure that there is an __init__.py file in the polls directory On Mon, Jan 5, 2015 at 12:47 PM, Xavier Ordoquy wrote: > Hi, > > > Le 5 janv. 2015 à 16:41, ibes ... a écrit : > > hello, > I am frustrated with django and phyton tutorial it is

Re: Change keys in values dictionary.

2015-01-05 Thread Lee Hinde
That example was just showing the part of the values 'grab' that was a problem; in real life I'm getting data from Recipient as well. On Sun, Jan 4, 2015 at 11:50 AM, Collin Anderson wrote: > Hi, > > Why not query it directly from Message? > >

Re: is there a Django library for AJAX support

2015-01-05 Thread Krishnakant Mane
I see, it is a great library, yet I still have to write some javascript code. I was looking for some library wich let's say integrates with Jquery and gives access to it's AJAX functionality through Python code, just like crispy-forms does for CSS. Happy hacking. Krishnakant. On 01/05/2015

Re: Error: No module named polls

2015-01-05 Thread Xavier Ordoquy
Hi, > Le 5 janv. 2015 à 16:41, ibes ... a écrit : > > hello, > I am frustrated with django and phyton tutorial it is very difficult > i'm having a problem with the tutorial of django and python, > > am using django 1.7.1 and python 2.7 on win xp-sp3 so far it was good, i

Re: Problem with for and if

2015-01-05 Thread Zoltán Bege
You should use the string's count method: zmienna.count(szukana) See help("string.count") On Monday, January 5, 2015 4:32:06 PM UTC+2, Dariusz Mysior wrote: > > I want search count of szukana in zmienna but code below counting all 12 > letters from "traktorzysta" word > > szukana="t" >

Model to create forms

2015-01-05 Thread Lorenzo Bernardi
Hello All, I'm rather new to django and also web and database stuff and so I might not use the correct term. i need to write an application which is a log book for experiments. The purpose is to store information about various experiments on different experiment to keep a trace and

Re: Error: No module named polls

2015-01-05 Thread ibes ...
hello, I am frustrated with django and phyton tutorial it is very difficult i'm having a problem with the tutorial of django and python, am using django 1.7.1 and python 2.7 on win xp-sp3 so far it was good, i create everything without problem but in tutorial step where it says:

Re: Expected performance of the django development server?

2015-01-05 Thread Richard Brockie
Hi Jani, That's a correct diagnosis. I knew Django was doing lazy loading, but didn't fully understand the implications. In my case I have a filtered and ordered queryset resulting in ~400 records. Upon processing in the template, each was prompting a database visit 3 times when outputting

Re: is there a Django library for AJAX support

2015-01-05 Thread Daniel França
Have you tried Dajax/Dajaxice? http://www.dajaxproject.com/ Em Sun Jan 04 2015 at 2:15:16 PM, Krishnakant Mane escreveu: > Hello all, > I am realy impressed with the Django forms and some additional > enhancements with CrispyForms >

Problem with for and if

2015-01-05 Thread Dariusz Mysior
I want search count of szukana in zmienna but code below counting all 12 letters from "traktorzysta" word szukana="t" zmienna="traktorzysta" def gen(): count=int(0) for a in zmienna: if szukana in zmienna: count+=1 else: continue

Re: Apache and Djagno

2015-01-05 Thread Eddilbert Macharia
On Saturday, January 3, 2015 7:45:00 PM UTC+3, SungHo Park wrote: > > Hi > I have tried to use Django in Apache, but it doesn't work. > > My Django's version is 1.7.1 so I refered this page. > https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ >

Re: Expected performance of the django development server?

2015-01-05 Thread Vijay Khemlani
1189 queries is quite a large amount, are all of those really needed? I think some profiling is in order. On Mon, Jan 5, 2015 at 3:09 AM, Jani Tiainen wrote: > On Sun, 4 Jan 2015 20:41:58 -0800 (PST) > Richard Brockie wrote: > > > Hello again, > >