Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
\(^o^)/ On Tue, Jul 3, 2012 at 4:53 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > You are welcome. Glad you got it working :) > > _Nik > > > On 7/3/2012 3:33 PM, Min Hong Tan wrote: > > Thx nik, > > I'm confused , your words has aroused

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
tps://docs.djangoproject.com/en/dev/topics/email/?from=olddocs/#django.core.mail.EmailMessage > > You won't use HttpResponse at all, just EmailMessage (using > message.attach). > > _Nik > > > On 7/3/2012 1:34 PM, Min Hong Tan wrote: > > sorry all, maybe i'm not typ

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
ou would use an HttpResponse when sending an > email. > > _Nik > > On 7/3/2012 11:20 AM, Min Hong Tan wrote: > > hi, > > > > I have a problem to send mail using Emailmessage, > > i wan to attach the file that render using httpresponse and send, but > > always sho

how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
hi, I have a problem to send mail using Emailmessage, i wan to attach the file that render using httpresponse and send, but always show me "int" does not have method "lower". therefore, I think to save the file in the server and then attach using emailmessage. but how do i get the httpresonse to

mssql

2012-06-07 Thread Min Hong Tan
hi all, i'm going to use django-mssql. is there any one has use this b4? and any working example? am i need to define a model in models.py?? how if i run syndb. will it sync to my default. mysql database? Regards, MH -- You received this message because you are subscribed to the Google Groups

list indices must be integers, not str

2012-06-01 Thread Min Hong Tan
Hi all, My error msg when i trying to pass character instead of decimal value through the URL pattern URL Link: /project1/program1_add/DUM014749/ URLS.py url(r'^program1_add/(?P\w{1,13})/$', 'view.program_common_add''), Is there any way to pass character instead of value? Regards, MH

Re: output string for template render object

2012-05-27 Thread Min Hong Tan
mple, of values in the context > (programs, generate_html,generate_script), your template and the result as > well as the expected result so that it is easier for forum members to help > you. > > Thanks. > > Regards, > Kok Hoor > > On Sun, May 27, 2012 at 4:28 PM, Min Hong

output string for template render object

2012-05-27 Thread Min Hong Tan
hi all, i have one question return render_to_response(mainPageTemplate, {'programs':find_program , 'generate_html':generate_html, 'generate_script':generate_script },

django connect alternate database.

2012-05-25 Thread Min Hong Tan
hi, I have a situation. currently i have one default django 's database. but, i wound like to connect to mssql/other database. - how can i get connected to ms-sql/other database? - is it we have to create class in models? the database is for read only. Hope able to get the information. Regards,

model form_set can not delete

2012-05-23 Thread Min Hong Tan
Hi there, i have a problem whereby, if i for form in formset line by line and run form.save(). my delete (ticked) item will not be deleted. and if i 'm direct using formset.save(). it did deleted. where am i code wrong already? q1 = modelformset_factory(CustomerDetail,

Re: user.set_password('new password')

2012-05-19 Thread Min Hong Tan
thanks all :) On Sat, May 19, 2012 at 9:49 AM, Timothy Makobu <makobu.mwambir...@gmail.com > wrote: > user.save returns the function object, which is a valid statement, so > Python wont raise an Exception. > > > On Sat, May 19, 2012 at 9:23 AM, Min Hong Tan <tan.dja...@

Re: user.set_password('new password')

2012-05-19 Thread Min Hong Tan
hi.. thanks!! haha... didn't notice that. how can no error...prompt out one On Fri, May 18, 2012 at 11:48 PM, Jonathan D. Baker < jonathandavidba...@gmail.com> wrote: > Save is a method, so it needs parentheses: user.save() > > Sent from my iPhone > > On May 18, 2012,

user.set_password('new password')

2012-05-18 Thread Min Hong Tan
Hi, I 'm trying to change password in views.py in one of my def. having the below code. newpassword ="testing123" user = User.objects.get(username__exact = request.user) user.set_password(newpassword) user.save it didn't prompt me any error. but, why my password still remained unchanged?

Re: Can't locate 'media' directory

2012-05-17 Thread Min Hong Tan
ROOT_PATH is, on > an HTML page? > > > On Wed, May 16, 2012 at 3:55 PM, Min Hong Tan <tan.dja...@gmail.com>wrote: > >> hi, >> >> your media folder location should be >> >> /media >> >> example: your ROOT_PATH is c:\project\ajax_tut >> t

Re: Can't locate 'media' directory

2012-05-16 Thread Min Hong Tan
hi, your media folder location should be /media example: your ROOT_PATH is c:\project\ajax_tut then your media file should be c:\project\ajax_tut\media MEDIA_ROOT = os.path.join(ROOT_PATH, 'media') MEDIA_URL = '/media/ ' < like this should be ok. you

Re: Disable ModelChoiceField field in ModelForm

2012-05-12 Thread Min Hong Tan
problem solved. from django.forms import ModelForm,Select prg_type = forms.ModelChoiceField(queryset=ProgramType.objects.all(),widget=Select(attrs={'disabled':'disabled'})) in forms.py On Sat, May 12, 2012 at 4:53 PM, Min Hong Tan <tan.dja...@gmail.com> wrote: > hi, > > I have

Disable ModelChoiceField field in ModelForm

2012-05-12 Thread Min Hong Tan
hi, I have a foreign field show in the modelform, and i wish to disable it, may i know how to disable it in modelform? i tried attrs={'disabled':'disabled} but, it prompt doesn't have attrs attribute. Regards, MH -- You received this message because you are subscribed to the Google Groups

Re: disabled or readonly field 's problem

2012-05-12 Thread Min Hong Tan
an" methods of the form. The documentation is > here<https://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-a-specific-field-attribute> > . > > On Sat, May 12, 2012 at 8:56 AM, Min Hong Tan <tan.dja...@gmail.com>wrote: > >> hi, >> >> i have a problem

disabled or readonly field 's problem

2012-05-11 Thread Min Hong Tan
hi, i have a problem on the formmodel. basically, to set the field read only and disabled is easy. but, the problem which I facing now, is a bit complicated. - if set field "read-only" field. We can actually modify the record by using web developer tools by press "F12" to modify the record and

unique key error doesn't show using copy record in modelform.

2012-05-10 Thread Min Hong Tan
hi, my scenario as below: - I want to copy existing record and show at the form. then clear the pk and id then it will be able to "add" instead of "update". - all working fine. but, if the record is exist (Unique error). it should prompt unique key 's error. but, in the form.is_valid has no

Re: jquery form post without refresh the page

2012-05-05 Thread Min Hong Tan
i think i use .bind() instead of .live. because .live will add the event everytimes it .html again. Thanks On Sat, May 5, 2012 at 2:22 PM, Min Hong Tan <tan.dja...@gmail.com> wrote: > seems like .html has another problem. it will duplicate itself (even not > seen in the screen).

Re: jquery form post without refresh the page

2012-05-05 Thread Min Hong Tan
seems like .html has another problem. it will duplicate itself (even not seen in the screen). but it did post Number of times when i submit the form. still need to struggling..bugs still exist.. On Sat, May 5, 2012 at 2:17 PM, Min Hong Tan <tan.dja...@gmail.com> wrote: > hi Oscar, &g

Re: jquery form post without refresh the page

2012-05-05 Thread Min Hong Tan
hi Oscar, I think maybe it over some ajaxsetup({cache:false}) prevention when doing replaceWith. I have solve the problem by using ".html" instead of ".replaceWith". Thank you for your help. very appreciate it . Regards, MH On Sat, May 5, 2012 at 2:01 PM, Oscar Mederos

Re: jquery form post without refresh the page

2012-05-05 Thread Min Hong Tan
. it will still static and show the last validation error. how you solve this issue? seems like more to javascript itself . Regards, MH On Fri, May 4, 2012 at 11:17 PM, Min Hong Tan <tan.dja...@gmail.com> wrote: > hi oscar, > > Thank you!!! that is awesome! i not even need to mani

Re: jquery form post without refresh the page

2012-05-04 Thread Min Hong Tan
hi oscar, Thank you!!! that is awesome! i not even need to manipulate the form using output data json! thanks! but , $("xxx").live really is important... Regards, MH On Fri, May 4, 2012 at 4:56 PM, Oscar Mederos wrote: > Hello Min, > > On Friday, May 4, 2012, 10:14:46

Re: jquery form post without refresh the page

2012-05-04 Thread Min Hong Tan
hi oscar, how do you make use of the particular method to be able to render the form only? as you said make use of the https://docs.djangoproject.com/en/1.4/ref/contrib/csrf/#ajax and it able to render the form instead of page? because i'm using kurtis method, if any validation error, i retrieve

Re: jquery form post without refresh the page

2012-05-04 Thread Min Hong Tan
t; > > Good luck! > -Kurtis Mullins > > On Thu, May 3, 2012 at 1:46 PM, Bill Freeman <ke1g...@gmail.com> wrote: > >> AJAX >> >> You may require a separate view, but maybe not. >> >> If you search for jQuery and AJAX there should be samples. >&

jquery form post without refresh the page

2012-05-03 Thread Min Hong Tan
is there any sample that i can refer to do the ajax style form post without refresh the whole page? or backend form.save validation without refresh my form? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to