Re: template problem in windows

2007-10-08 Thread Dushyant Sharma
yes thanks mike mostly i work in linux but i had to see some work on windows and this problem was little strange. but all well now. thanks again --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

template problem in windows

2007-10-08 Thread Dushyant Sharma
i have found this during working with django on windws. if i create folder like template, backup (start characters t, b etc) it wont work because template folder settings in the SETTINGS.py will be TEMPLATE_DIRS = ( 'c:\myproject\template', } it would not work because \t is tab

Re: Data truncated for column 'text' at row 1

2007-09-28 Thread Dushyant Sharma
the problem seems to be your database installation. you can increase CharField length by installaing mysql version 5.xx. also check what database you are using and character set it supports. On Sep 25, 10:42 am, Sebastian Dahlgren <[EMAIL PROTECTED]> wrote: > Hi! > I have built my site on the

Re: changing settings.py

2007-09-28 Thread Dushyant Sharma
you can try adding MaxRequestsPerChild 1 to your httpd.conf file and restart apache then i think you dont' need to restart apache every time. this is just for testing purpose, for more read documentation on it. --~--~-~--~~~---~--~~ You received this message

run queries stored in database

2007-09-28 Thread Dushyant Sharma
can we save django ORM queries in database and execute them later. suppose i have class class queries(): qry=models.CharField(maxlength=200) and i save a query "test.objects.filter(id=5)" in qry now want to run query stored in qry field

problem organizing queries

2007-09-27 Thread Dushyant Sharma
hi i am having problem with relating objects. i have models as below class support(): suptype = models.CharField(maxlength=255) class DispMaster(): dmtype=models.ForeignKey(support) class DataDispMaster(): ddmmaster=models.ForeignKey(Master) class Master(): class DataMaster():

Re: url config problem

2007-09-27 Thread Dushyant Sharma
i think you are using windows. try adding "MaxRequestsPerChild 1" (without quotes) to httpd.conf, you can change this setting later after reading how apache handles requests. i think that wouldn't be required for you now. also put your application to the python path (you can try initial

Re: url config problem

2007-09-27 Thread Dushyant Sharma
> athttp://82.165.180.35:8088/djproject/ > I can see the first django page. Could not run any application when I > try to do that by editing urls.py file. > > Thanks, > Swati > > On Sep 26, 1:27 pm, Dushyant Sharma <[EMAIL PROTECTED]> wrote: > > > i think you have

Re: url config problem

2007-09-26 Thread Dushyant Sharma
i think you have not configured httpd.conf and this is why apache can not identify the request. read this page http://www.djangoproject.com/documentation/modpython/ also make entry in httpd.conf LoadModule python_module /usr/local/apache2/modules/mod_python.so (for linux) for windows use your

Re: response from another function

2007-09-18 Thread Dushyant Sharma
> function1(request): > return function2(request) no i just want that function2(request) call makes a permanent redirect (not HttpResponseRedirect, i dont want more burden on urls.py) to function2 and all the response should be sent from function2 only. it should never come back to function1

response from another function

2007-09-18 Thread Dushyant Sharma
is it possible to return HttpResponse from another function like i have called a function say furnction1(request) and now is it possible function1(request): #normal statements #here i call another function function2(request) return HttpResponse('bye') #just for

Re: How to run server after install Django

2007-09-18 Thread Dushyant Sharma
dear Han you must add path of python.exe, django-admin.py and manage.py to your system path you should avoid copying system files here and there as it will cause problems. clean approach should be 1. install python (say installed at C:\python25) 2. set path for python.exe 3. install django

size of urls.py

2007-09-14 Thread Dushyant Sharma
is there any performance bottleneck when the size of urls.py goes large. if yes how to overcome that. also if we use same url for a particular group, based on some hidden action variable in htmls, would it improve performance. like i am using if request.method == 'POST': action =

Re: User session variable in view

2007-09-14 Thread Dushyant Sharma
use RequestContext http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext pass request object to it c= RequestContext(request, {other objects}) then you can use user.fieldname in your view --~--~-~--~~~---~--~~ You

Re: Uploading files

2007-09-14 Thread Dushyant Sharma
class ThingForm(forms.Form): name = forms.CharField(max_length=30, required=True, label=_('Name of the thing')) photo = forms.Field(widget=forms.FileInput, required=False, label=_('Photo'), help_text=_('Upload an image (max %s kilobytes)' % settings.MAX_PHOTO_UPLOAD_SIZE)) def

Re: FileInput widget and FileField

2007-09-10 Thread Dushyant Sharma
here is model class Thing(models.Model): PID=models.ForeignKey(Property) name = models.CharField(blank=False, null=False, maxlength=30) photo = models.ImageField(upload_to='images/things/', blank=True, null=True) the form class ThingForm(forms.Form): name =

log in without loggin in

2007-09-04 Thread Dushyant Sharma
hi it might sound strange but what i am thinking is to use two servers one for authentication only and one for serving normal content. authentication server can not come into direct contact with users. here how it goes. suppose we have user server USrv and authentication server ASrv. auth_user

Re: Email problem

2007-06-14 Thread Dushyant Sharma
i think you should try port 25 at EMAIL_PORT after all you wont loss anything giving a try On Jun 14, 6:12 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-06-14 at 05:35 -0700, Brij wrote: > > Hi, > > > I am using the django.core.mail for sending mail to users in my > >

Re: jsonrpc working example

2007-06-14 Thread Dushyant Sharma
eating two projects setup with apache virtual host. one is interacting with user as we do normally. another is serving the first project by taking requests and sending response to the first without letting the user know anything. On Jun 14, 5:39 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: >

jsonrpc working example

2007-06-14 Thread Dushyant Sharma
has any body used jsonrpc with django if yes kindly help me here is how to use it but i cant use it with django facing problems http://json-rpc.org/wiki/python-json-rpc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: session variable in template

2007-06-13 Thread Dushyant Sharma
how can i use it with HttpResponseRedirect() like if i wish to use it as return HttpResponseRedirect('/someurl', RequestContext(request)) is it possible On Jun 13, 5:42 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-06-12 at 13:27 +, Dushyant Sharma wrote:

session variable in template

2007-06-12 Thread Dushyant Sharma
i am building single page for logged in users and anonymous users where i can use uid for logged in users and show specific things to them and for this i want to use session variable in template. i am trying request.session.uid in template where uid is session variable.. i have set

Re: manipulator for auth.user

2007-06-08 Thread Dushyant Sharma
come on somebody pl. reply --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to

Re: manipulator for auth.user

2007-06-08 Thread Dushyant Sharma
if this is possible or not to apply manipulator on User and on two models. i have read previous posts in this regard sugggesting method what i have used but i am getting errors as above. --~--~-~--~~~---~--~~ You received this message because you are subscribed

manipulator for auth.user

2007-06-08 Thread Dushyant Sharma
i am trying to add manipulator on default User object. i am getting name, email and address from the form and trying to fill date_joined and last_login attributes myself as user_data['date_joined_date']=datetime.date.today() user_data['date_joined_time']=(datetime.time()

Re: if 'photo' in request.FILES seems to be not working

2007-06-07 Thread Dushyant Sharma
i can not beleive this i had only to write enctype in capital ENCTYPE="multipart/form-data" i am sick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django Deployment Headache (Apache Permissions?)

2007-06-07 Thread Dushyant Sharma
i am having the same problem i tried adding mysite.pth to site- packages folder now i can see the path in python as /root/workspace/ and /root/workspace/mysite settings.py is in mysite directory at /root/workspace also i have __init_.py there it show the same error but if i put the directory

if 'photo' in request.FILES seems to be not working

2007-06-06 Thread Dushyant Sharma
hi friends i am trying to upload an image file but i am getting errors. code is as follows def thing_add(request): if request.method == 'POST': if 'photo' in request.FILES: # it aint getting here just skip this section try: img =

Re: access user.id

2007-05-30 Thread Dushyant Sharma
hey thanks chrominance for real good helping stuff. i was not looking at the last line which clearly states that argument 1 must be string or read-only buffer, not long your return HttpResponse(str(uu.id))is really helpful and also thanks for get() and filter(). i'll keep that