saving latitude and longitude values in django

2013-06-04 Thread Sivaram R
models.py class Geolocation(models.Model): user = models.ForeignKey(User, null=False) location_latitude = models.CharField('Latitude', max_length=20, null=True, blank=True) location_longitude = models.CharField('Longitude', max_length=20, null=True, blank=True) In my application,i a

Re: saving latitude and longitude values in django

2013-06-04 Thread Sivaram R
h lat & long. > You could compute this using a standard norm calculation but its slow > compared to using a native DB query. > > > On Tue, Jun 4, 2013 at 8:49 AM, Sivaram R > > wrote: > >> models.py >> >> class Geolocation(models.Model): >>

How to make set background image for printout layout

2013-06-13 Thread Sivaram R
Hi,i am doing printers,print-out functionality.So the data what ever i want to print are rendered in a template called print.html.So while method call it is rendering that template as print-out format.I don't know how to set a background image for that print-out template.Is it same as table back

Re: How to make set background image for printout layout

2013-06-13 Thread Sivaram R
results trying in a more appropriate group or forum. > > Thomas > > > On Thu, Jun 13, 2013 at 2:12 PM, Sivaram R > > wrote: > >> Hi,i am doing printers,print-out functionality.So the data what ever i >> want to print are rendered in a template called print

save date in one format in Django

2013-06-18 Thread Sivaram R
forms.py DATE_INPUT_FORMAT = ( ('%d/%m/%Y','%m/%d/%Y') ) class ReportDatetimeForm(forms.ModelForm): manual_date = forms.DateField(input_formats = DATE_INPUT_FORMAT, widget=forms.DateInput(attrs={'size':'15','id':'datepicker','readonly':'readonly'})) class Meta: model = Report fields = ['

redirect to unfinished section in django

2013-06-24 Thread Sivaram R
I am developing an application in Django.It is developed to create new report ,edit the report and delete the report. Consider i am having 5 pages in my app and if i completed edit in 1st two pages,now i am saving the report so,it will be saved as draft.For editing the draft report,a button

calling single save function on two button click

2013-07-04 Thread Sivaram R
who.html {% csrf_token %} {{report_person.report_person.name }} {{report_person.info.first_aid}}{{report_person.info.first_aid.label}} {{report_person.info.sick_bay}}{{report_person.info.sick_bay.label}}

Django date format issue

2013-07-04 Thread Sivaram R
views.py def calender(request): "" settingsform = SettingsForm(instance=settings) if request.method == 'POST': reportform = ReportDateTimeForm(request.POST, instance=report) if reportform.is_valid(): report = reportform.save(commit=False) re

Re: Django date format issue

2013-07-05 Thread Sivaram R
know why this is happening and how to solve this. Thanks On Thursday, July 4, 2013 5:20:52 PM UTC+5:30, Sivaram R wrote: > > views.py > > def calender(request): > > """""" > settingsform = Sett

login successfully takes to account/profle

2013-07-05 Thread Sivaram R
I am developing an django app,now the problem is after successfull login,it takes me to account/profile which is no longer available in django urls.But after removing that account/profile and hit enter it is taking inside the application.Do i need to frame a method and page for that or how to

Re: login successfully takes to account/profle

2013-07-05 Thread Sivaram R
IRECT_URL = "/" > > > 2013/7/5 Sivaram R > > >> I am developing an django app,now the problem is after successfull >> login,it takes me to account/profile which is no longer available in >> django urls.But after removing that account/profile and hit enter it is &

How to create a sessio in django

2013-07-08 Thread Sivaram R
I am learning django. I came accross the django doc about session. My question is for example if i am having the below models.py class Report(models.Model): user = models.ForeignKey(User, null=False) report_number = models.CharField('Incident Number', max_length=100) device_id = mode

showing the checked item alone in template

2013-07-15 Thread Sivaram R
forms.py PERSON_ACTIONS = ( ('1', '01.Allowed to rest and returned to class'), ('2', '02.Contacted parents /guardians'), ('3', '02a.- Unable to Contact'), ('4', '02b.Unavailable - left message'),) class PersonActionsForm(forms.ModelForm): action = forms.MultipleChoiceField(widge

Re: showing the checked item alone in template

2013-07-15 Thread Sivaram R
Hi,can i get any answer or let me know the way to do this. Thanks On Monday, July 15, 2013 7:46:43 PM UTC+5:30, Sivaram R wrote: > > forms.py > > PERSON_ACTIONS = ( > ('1', '01.Allowed to rest and returned to class'), > ('2', '02.Cont

Re: showing the checked item alone in template

2013-07-17 Thread Sivaram R
- check if this was the selected choice from db, or > from POST data > > > And then you return this to your template and create custom html tags for > this... > > Enjoy > > > Dne pondělí, 15. července 2013 16:16:43 UTC+2 Sivaram R napsal(a): >> >> forms.p

Re: showing the checked item alone in template

2013-07-17 Thread Sivaram R
+5:30, Tom Evans wrote: > > On Mon, Jul 15, 2013 at 3:16 PM, Sivaram R > > wrote: > > forms.py > > > > PERSON_ACTIONS = ( > > ('1', '01.Allowed to rest and returned to class'), > > ('2', '02.Contacted

change is_superuser field in django user table

2013-07-18 Thread Sivaram R
By default from project directory by running manage.py createsuperuser comment i am able to create a superuser,but the .is_superuser flag is the default django flag to differ superuser or other user. I don't what to use that because i am using that flag throughout the application to show sett

Re:

2013-07-18 Thread Sivaram R
Have you given the correct url? for file call ? Regards, Sivaram R On Thursday, July 18, 2013 11:41:29 PM UTC+5:30, Harjot Mann wrote: > > http://tny.cz/ab1b86eb > Here are my views for creating pdfs but I am getting this error: > > HTTPError at /report/myview/ > > HTTP

create random string for username

2013-07-18 Thread Sivaram R
Hi, I would like to create username in django user model as random string.I am using models form to save the user profile in that model. In models form i am having the fields like first_name,last_name,email_id,password,is_active,is_staff and is_superuser and username. While saving th

password field showing hashed value on form value update

2013-09-18 Thread Sivaram R
I have views.py to show the form instance and update the instance. On edit the form data,all other field are showing the correct value,password field is showing the entire hashed value from database and not the entered password. Is any way to show the entered password instead of hashed value

Re: password field showing hashed value on form value update

2013-09-18 Thread Sivaram R
original value entered.How to decrypt that hashed value to original value. Thanks On Wednesday, September 18, 2013 10:59:30 PM UTC+5:30, Kakar wrote: > > R u looking at the password from the admin? > > > > Sivaram R > wrote: > > > I have views.py to show the form in