Re: django refreshing problem

2013-08-29 Thread Harjot Mann
On Mon, Aug 26, 2013 at 2:36 PM, Harjot Mann wrote: > In django whenever I make some template I need to refresh it. I am not > getting what is the problem, is it some cache problem, even I disabled > it using never_cache but nothing worked, Is there anyone who faced the > same problem. Please help

reload counts

2013-08-29 Thread Harjot Mann
I want to add a feature in my app in which when user opens a template, it counts the number of clicks done and also count the number of of times the page reloads. Not have any idea. Can anyone help me? -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy: http://harjotmann.wordp

Re: Saving google maps values to db

2013-08-29 Thread Kelvin Wong
If you have a map on a page, you can add some Javascript that obtains the Lat and Lng and Zoom Level from the map and then use that data to fill in a form (or do whatever you want with it). This code give some hints https://developers.google.com/maps/documentation/javascript/examples/map-coordin

Saving google maps values to db

2013-08-29 Thread Nkansah Rexford
I came across this app for displaying Google maps to pages in django. https://bitbucket.org/dbinit/django-gmapi/src Is there a way I can save Google maps values via a form to db for retrieval later in a page? -- You received this message because you are subscribed to the Google Groups "Django

Save data from parent in inline admin form

2013-08-29 Thread George Tsotsos
i have a model admin form with 3 inlines, my problem is that i want one of the inline forms be saved with data from parent form. eg. *fieldfrominline = fieldfromparent *class multifield1_inline(admin.TabularInline): model = multifield1 extra = 1class multifield2_inline(admin.TabularIn

Django Form Wizard: Why is this happening?

2013-08-29 Thread Bruno Lottero
*I have a dinamic form wizard step as following:* class AltaForm6(forms.Form): CHOICES = ((1, 1,), (2, 2,)) username = ChoiceFieldInvalid(required=True, label="Usuario", widget=forms.RadioSelect, choices=CHOICES) username2 = forms.CharField(required=False, label="Otro")def clean_username2(self)

Django Form Wizard: Why is this happening?

2013-08-29 Thread Bruno Lottero
*I have a dinamic form wizard step as following:* class AltaForm6(forms.Form): CHOICES = ((1, 1,), (2, 2,)) username = ChoiceFieldInvalid(required=True, label="Usuario", widget=forms.RadioSelect, choices=CHOICES) username2 = forms.CharField(required=False, label="Otro") def clean_username2(self)

Re: AJAX - Class Based View or Function Based View?

2013-08-29 Thread Lee Hinde
On Wed, Aug 28, 2013 at 11:51 PM, Sarthak Dev wrote: > I'm working on an app which uses a lot of AJAX requests. Having previously > used FBVs for handling ajax and returning JSON, how efficient will it be to > use a CBV for the same? I read the django docs and found > mixins

Re: need a help in ListView 1) how to debug the rendered request and response

2013-08-29 Thread Tom Evans
On Wed, Aug 28, 2013 at 7:08 PM, bab mis wrote: > Here is my code > > models.py > === > class member(models.Model): > first_name = models.CharField(max_length=30) > last_name = models.CharField(max_length=30) > dob = models.DateField() > > def get_fields(self): >

Re: Javascript encoding and python decoding and vice versa

2013-08-29 Thread Tom Evans
On Wed, Aug 28, 2013 at 7:53 PM, Samantha Atkins wrote: > We all know about SSL so stop the lectures please. Sometimes you simply > want to reasonably encrypt on client and decrypt on server and for one > reason or another SSL is not an option. SSL is always an option, you are just not choosing

Re: AJAX - Class Based View or Function Based View?

2013-08-29 Thread Jonathan Baker
I feel like FBV vs CBV is partially a matter of taste. If your app is AJAX-heavy though, why not use one of the proper API frameworks like http://django-rest-framework.org/ or http://django-tastypie.readthedocs.org/en/latest/ ? On Thu, Aug 29, 2013 at 12:51 AM, Sarthak Dev wrote: > I'm working o

Re: else: invalid syntax

2013-08-29 Thread Nagarajan Dharmar Sitha
Thank you Tom Raja -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users

Re: else: invalid syntax

2013-08-29 Thread Tom Lockhart
On 2013-08-29, at 5:33 AM, Nagarajan Dharmar Sitha wrote: > if (os.stat('udacityLastFileNumberForL.txt').st_size == 0): > MaxNumberFile = open("udacityLastFileNumberForL.txt", "w") > self.udacityFileVersionNumberL = 1 > MaxNumberFile.write("DATA_VERSION_CONST

else: invalid syntax

2013-08-29 Thread Nagarajan Dharmar Sitha
if (os.stat('udacityLastFileNumberForL.txt').st_size == 0): MaxNumberFile = open("udacityLastFileNumberForL.txt", "w") self.udacityFileVersionNumberL = 1 MaxNumberFile.write("DATA_VERSION_CONSTANT_M: %s" % self.udacityFileVersionNumberL) MaxNumberFil

AJAX - Class Based View or Function Based View?

2013-08-29 Thread Sarthak Dev
I'm working on an app which uses a lot of AJAX requests. Having previously used FBVs for handling ajax and returning JSON, how efficient will it be to use a CBV for the same? I read the django docs and found mixins