Problem with session.
I changed SESSION_COOKIE_AGE value in my settings file to lower value. After an hour or so, I increased the SESSION_COOKIE_AGE value but now I can not log in neither to admin nor to my Django application. When I try to log in to admin it says: Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again. But cookies are enabled.How to solve the problem? Any help would be appreciated Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Setting cookies expiration via SESSION_COOKIE_AGE
I changed SESSION_COOKIE_AGE to a lower value and now I can not log in to admin site. It says: Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again But the bowser does accept cookies. Eventhough I increased SESSION_COOKIE_AGE value , the result is the same. I can not log in . Any help would be appreciate. Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
SESSION_COOKIE_AGE
I changed SESSION_COOKIE_AGE value in my settings file to lower value. After an hour or so, I increased the SESSION_COOKIE_AGE value but now I can not log in neither to admin nor to my Django application. When I try to log in to admin it says: Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again. But cookies are enabled.How to solve the problem? Any help would be appreciated Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
UTF8 character set problem
I use MySQL database with utf8 character set and utf8_czech_ci collation. It works well on Linux server( with mod_python) but when I try to export the data and import into the same Django application 9but running on XP machine with runserver 0,the utf8 is gone.Instead of a proper coding there are some strange characters. I use Django 0.91 version. Any help would be appreciated Thank you L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to correct this error?
Hello Corey, Thank you for your reply. I do not like PHP and I prefer comand line. So, after some testing I finally found out the command ALTER TABLE `tablename ` CHANGE `fieldname` `fieldname` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_czech_ci. Regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to correct this error?
Corey, Thank you for your reply. The exception Value (1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='") is from this command: gallerys.get_list(Title__exact=new_data['Title']) So, I would guess that Title field or new_data['Title'] has (latin1_swedish_ci,COERCIBLE) collation. But how can I find out which one is of (latin1_swedish_ci,COERCIBLE) collation? Thank you for the reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to correct this error?
Thank you for the reply I still use Django 0.91 and I could not find django/db/backends/mysql/base.py I found only C:\Python23\Lib\site-packages\django\core\base.py and C:\Python23\Lib\site-packages\django\core\db\mysql.py Which file should I change with if self.connection.get_server_info() >= '4.1': cursor.execute("SET NAMES utf8") ? Scater, the erorr says: Exception Value: (1267, "Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='") Exception Location: C:\PYTHON23\lib\site-packages\MySQLdb\connections.py in defaulterrorhandler, line 32 The exception Value is from this command: gallerys.get_list(Title__exact=new_data['Title']) So, how can I find out what has (latin1_swedish_ci,COERCIBLE) collation? Title field has that or new_data['Title'] has the (latin1_swedish_ci,COERCIBLE) collation? Thank you for the reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to correct this error?
Limodou, Thank you for your reply. Is it possible to "convert" the field in MySQL instead of converting characters? Thank you for reply L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to correct this error?
Hello , I use MySQL with Django and it works great untill I try to insert non-English characters.Then I get (1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='") How can I correct this error? Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: What relating model should I use?
Maciej, Thank you for help. L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
What relating model should I use?
In my project I have a user class that represents user's information. Now I would like to give users a possibility to set their favourite users. That means a user will set some his favourite users What model shall I use? Relating an object to itself, many-to-one or another model? Thank you reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Model & Views
Malcom, Thanks a lot for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Model & Views
In my model definition I have a field like this: Category = meta.CharField(choices=Categorylist,maxlength=30,blank=True) where Categorylist is defined in the models definition file like this: Categorylist=( ('1','Children clothes'), ('17','Dresses'), ('18','shoes'), ... ... ('20','suits'), (. Is it possible to work with Categorylist in my views and templates too without re-definition it there? Thank you for your help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Datetime and a template tag
Malcom, Thank you very much for your time and help. I found the reason of my problem. I had two different template tags but in both the same context variable and one overwrote the other. Best regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Datetime and a template tag
Malcom, Thanks a lot for help So, to sum up type ofresolve_variable(EndTime, context)-datetime.datetime.now() is 'datetime.timedelta' type of resolve_variable(EndTime, context) is 'datetime.datetime' type ofdatetime.datetime.now() is 'datetime.datetime' and value ofresolve_variable(EndTime, context)-datetime.datetime.now() is 20:58:52.313000 value of resolve_variable(EndTime, context) is2006-08-10 12:56:00 value ofdatetime.datetime.now() is 2006-08-11 15:57:07.687000 from that above I would expect that resolve_variable(EndTime, context)>datetime.datetime.now() should be FALSE but it works as if it were TRUE. Can you please help how to find out why it works in such way? Thank you B --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Datetime and a template tag
Hello Malcom, Thank you for your reply. The value of resolve_variable(EndTime, context) is 2006-08-10 12:56:00 but how can I find out the type in template tag? When I try something like this context['Type']=type(resolve_variable(self.EndTime, context)) im my tag and in template I use {{Type}} it is an empty Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Datetime and a template tag
Im my template tag I use something like this if resolve_variable(EndTime, context)>datetime.datetime.now(): ... ... ... where in a table EndTime is 2006-08-10 12:56:00 and say datetime.datetime.now() is about datetime.datetime(2006, 8, 11, 13, 35, 14, 312000) from that said above, should be resolve_variable(EndTime, context)>datetime.datetime.now(): False? I would say YES. But in my template tag it is calculated as True. In my template tag resolve_variable(EndTime, context)-datetime.datetime.now() is calculated to be 23:20:40.422000 So, how can I test if one date is lower than the other? Thank you for help L> --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Question about tags
Thanks a lot.It works! L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Question about tags
I have this very simple tag # from django.core.template import Library, Node from django.core import template register = Library() class FirstTestNode(Node): def __init__(self, num): self.num = num def render(self, context): context['print_results'] = self.num return "" def mytest(parser, token): bits = token.contents.split() print bits if len(bits) != 2: raise template.TemplateSyntaxError, 'Test tag takes exactly one argument' return FirstTestNode(bits[1]) mytest = register.tag(mytest) ## in my template I can call it like this {%load mytest%} {% mytest 4%} {{print_results}} and it prints a number 4 So far, so good. But I would like to use it like this {%load mytest%} {%for value in Results %} {% mytest value %} {{print_results}} {%endfor%} ## where `value` variable can be a numeric from 0 to 100, so I would expect to get numbers from 0 to 100. But instead only `value` is printed . Why?Can anyone explain? Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How set a Date and Time format for an input field
Is it possible to set a Date and Time format for an input field in a form? For example instead of 2006-7-27 for Date I would like to use 27-7-2006 and istead of 10:21 for Time field I would like to use 10/21 Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: DateTimeField
I found the solution. It must be {{form.EndTime_date}} {{form.EndTime_time}} --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: DateTimeField
jrs, I tried to use {{form.EndTime.time}} and {{form.EndTime.date}} in a form but still NO input field is shown. Do you have any suggestion why? Thank you L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Auction in Django
Has anyone tried to implement an auction application in Django? L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Where can be a problem??
Chris, Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Where can be a problem??
I have the following models class User(meta.Model): Login=meta.CharField(maxlength=50,unique=True) Email=meta.EmailField(_('e-mail address'),blank=True) class Gallery(meta.Model): Title = meta.CharField(_("title"), maxlength=80) created = meta.ForeignKey(User) access=meta.ManyToManyField(User) Now I would like to grant access to a user for a particular gallery.So I created ManyToMany relation. So a new table mimi_gallerys_access is created( my database is mimi) . Let's suppose this table( for ManyToMany relation) is now +++-+ | id | gallery_id | user_id | +++-+ | 6 | 1 | 4 | | 11 | 2 | 7 | | 12 | 4 | 7 | | 13 | 5 | 7 | +++-+ Now I want to set access for gallery 5 to user 10 too. u2=users.get_object(id__exact='10') g=gallerys.get_object(id__exact='5') g.set_access([u2.id]) g.save() so I would expect to get +++-+ | id | gallery_id | user_id | +++-+ | 6 | 1 | 4 | | 11 | 2 | 7 | | 12 | 4 | 7 | | 13 | 5 | 7 | | 14 | 5 | 10 | +++-+ but I instead get mysql> select * from mimi_gallerys_access; +++-+ | id | gallery_id | user_id | +++-+ | 6 | 1 | 4 | | 11 | 2 | 7 | | 12 | 4 | 7 | | 14 | 5 | 10 | +++-+ WHY?? Any idea? Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is possible to have ManyToMany relation....
Aidas, Thank you for your help. I checked http://www.djangoproject.com/documentation/models/m2m_and_m2o/ but I can not find if it works with 0.91 version, that I use. Do you know that? Thank you for the reply L, --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Is possible to have ManyToMany relation....
Is possible to have ManyToMany and OneToMany relation like this? class User(meta.Model): Login=meta.CharField(maxlength=50,unique=True) Email=meta.EmailField(_('e-mail address'),blank=True) class Gallery(meta.Model): Title = meta.CharField(_("title"), maxlength=80) created = meta.ForeignKey(User) access=meta.ManyToManyField(User) Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to read parameters
>From outside but also can be sent from inside Django application --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to read parameters
Let's suppose a user click on a URL something like this http://www.server.com/ListTradeLeads/?page=6=admin . So some parameters( page and userId) are sent to the server but how can I find out ,in Django,values of these parameters , that is the page is 6 and userId is admin? I would like to use them further in a program Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Best idea?
Thanks a lot for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Best idea?
I am creating an application in Django where users can insert photos and I would like each owner of the photo(s) to be able to grant/revoke access to this photo(s) to other visitors. What could be the best idea how to do that? Thank you for replies L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to ?
No, it does NOT work for me. Finally I found a reason. I use old Django version and I must use get_gallery() and not gallery.Similarly get_created() and not created, so wanted_user = photos.get_object(id__exact='3').get_gallery().get_created() --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to ?
Not sure I fully understand. Can you please explain a little more? Do you mean that p.gallery.created should work( where p is my photo object)? Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to ?
NikI, thank you for your help. I tried >>>p=photos.get_object(id__exact='18') then >>> p.gallery_id.created_id Traceback (most recent call last): File "", line 1, in ? AttributeError: 'long' object has no attribute 'created_id' Where is a problem? When I tried >>> p.gallery_id I received 27L Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to ?
I have the following model # class User(meta.Model): Login=meta.CharField(maxlength=50,unique=True) Password=meta.CharField(maxlength=30,blank=True) class Gallery(meta.Model): Title = meta.CharField( maxlength=80) Description = meta.TextField(_("Description"), blank=True) created = meta.ForeignKey(User) class Photo(meta.Model): Title = meta.CharField(_("title"), maxlength=80) Description = meta.TextField(_("description"), blank=True) gallery = meta.ForeignKey(Gallery) ## I can easily find all photos by a user like this photos.get_list(gallery__created__Login__exact=''LoginOfUser') but how can I find a user for a particular photo? Thank you for help. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Django & Apache 1.x
Gabor, what trafic do you have at your website and what server configuration do you use? I am asking that because you use FastCGI and I had big problems with FastCGI when there was highload.So I decided to move to mod_python and no problem since Regards, L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Is it possible to do this from templates?
Hi, Is it possible to test ,if an image exists, from a template? To explain: Let's suppose in my template I use and {{ImageName}} is a picture that can exists but it needn't. But if it does not exist, then I will receive an ugly picture in my view (HTML)result. So, I test that in my view but it would be better if I could test that directly from my template Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Mod_python and Django - AGAIN
No, it can not be that problem. I use the same models and source on Dreanhost and it works. But now I want to use my Linux box with mod_python and the code does not work. So, any other idea how to solve the problem? Thank you. L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Mod_python and Django - PROBLEM
Malcom. Thank you for help. I followed http://www.modpython.org/live/current/doc-html/inst-trouble.html so i added to my httpd.conf SetHandler mod_python PythonHandler mod_python.testhandler but when I point my browser to the /mpinfo URL I will get Mod_python error: "PythonHandler mod_python.testhandler" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 287, in HandlerDispatch File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 461, in import_module ImportError: No module named testhandler ## but when I check the directory there is testhandler.py file . Also when I test mod_python installation as described at http://www.modpython.org/live/current/doc-html/inst-testing.html it seem to be OK and working Any further idea where can be a problem? Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Mod_python and Django - PROBLEM
Simon, On Apache I use Apache/2.0.55 (Trustix Secure Linux/Linux) mod_python/3.2.8 Python/2.3.5 PHP/5.0.5 mod_perl/2.0.0 Perl/v5.8.7 Do you think there can be a problem? Thank you for help regards, L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Mod_python and Django - PROBLEM
My settings.py looks like this: # Django settings for mimiproject project. DEBUG =True TEMPLATE_DEBUG = DEBUG SESSION_COOKIE_AGE=259200 ADMINS = ( # ('Your Name', '[EMAIL PROTECTED]'), ) MANAGERS = ADMINS SERVER_EMAIL='[EMAIL PROTECTED]' DEFAULT_FROM_EMAIL='[EMAIL PROTECTED]' EMAIL_HOST='localhost' DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'mimi' # Or path to database file if using sqlite3. DATABASE_USER = 'emii' DATABASE_PASSWORD = '' DATABASE_HOST = 'localhost' DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. # Local time zone for this installation. All choices can be found here: # http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE TIME_ZONE = 'America/Chicago' # Language code for this installation. All choices can be found here: # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes # http://blogs.law.harvard.edu/tech/stories/storyReader$15 #LANGUAGE_CODE = 'en-us' #LANGUAGE_CODE = 'cs' LANGUAGE_CODE = 'utf-8' #ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci SITE_ID = 1 #MEDIA_ROOT = "/home/bmabma/TEMPLATESmimi/Static/" #Python Syntax MEDIA_ROOT = "/Media/" #viz alias v httpd.conf # URL that handles the media served from MEDIA_ROOT. # Example: "http://media.lawrence.com; #MEDIA_URL = "http://localhost:8080/Media/; MEDIA_URL = "/Media/" # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/;, "/media/". ADMIN_MEDIA_PREFIX = '/media/' # Make this unique, and don't share it with anybody. SECRET_KEY = '[EMAIL PROTECTED]+p*#dv520qwex0rv' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.core.template.loaders.filesystem.load_template_source', 'django.core.template.loaders.app_directories.load_template_source', # 'django.core.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( "django.middleware.common.CommonMiddleware", "django.middleware.sessions.SessionMiddleware", "django.middleware.doc.XViewMiddleware", ) ROOT_URLCONF = 'mimiproject.urls' TEMPLATE_DIRS = ('/home/TEMPLATESmimi') INSTALLED_APPS = ('mimiproject.apps.mimi','django.contrib.admin',) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Mod_python and Django - PROBLEM
Hello Michael, thank you for help.It solved that problem. But now it says File "/home/django_src/django/core/db/__init__.py", line 23, in ? raise ImproperlyConfigured, "Could not load database backend: %s. Is your DATABASE_ENGINE setting (currently, %r) spelled correctly? Available options are: %s" % \ ImproperlyConfigured: Could not load database backend: No module named _mysql. Is your DATABASE_ENGINE setting (currently, 'mysql') spelled correctly? Available options are: 'ado_mssql', 'mysql', 'postgresql', 'sqlite3' but from Python shell it works OK. So, where can be a problem? Thank you for help L, --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to do this with Django?
I have two independent sites written in Django. Each requires login. And users must login in separately. I would like to make things easy for users and if a user signs in one site he will be also signed automatically into the other. Is it possible? L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Databases from different projects
Let's suppose I have project1 that has TableProject1 and project2 that has TableProject2 Is it possible to use in project2 data from TableProject1 ? Thank you for reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is Django suitable for a big numbers of visitors??
Thank you for your reply Now I have in my settings.py file: DEBUG = False MIDDLEWARE_CLASSES = ( "django.middleware.common.CommonMiddleware", "django.middleware.sessions.SessionMiddleware", "django.middleware.doc.XViewMiddleware", "django.middleware.cache.CacheMiddleware", ) CACHE_MIDDLEWARE_SECONDS=600 CACHE_MIDDLEWARE_KEY_PREFIX='' CACHE_MIDDLEWARE_GZIP=True is that enough? How can I verify that caching works? Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Is Django suitable for a big numbers of visitors??
I use Django with FastCGI ( via WSGI) and have problems with downtime when more visitors come to my website. Did anyone test Django apps for high numbers of visitors(hits)? If so, what configurations would you reccomend? Thank you for reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
What server configuration to use
I am going to setup a server to use it with Django. I am going to use: Trustix Linux (http://www.trustix.org) mod_Python with Apache Is 1GB memory enough? Regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: NULL vs.None
Honza and Malcom, Thanks a lot for help. L> X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr86106cwa; Sat, 20 May 2006 09:28:02 -0700 (PDT) X-Google-Token: nyuD6QwAAACFEHOnioDiO_ddsVcZbQxx Received: from 85.160.75.22 by i39g2000cwa.googlegroups.com with HTTP; Sat, 20 May 2006 16:28:02 + (UTC) From: "PythonistL" <[EMAIL PROTECTED]> To: "Django users" <django-users@googlegroups.com> Subject: Re: NULL vs.None Date: Sat, 20 May 2006 09:28:02 -0700 Message-ID: <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1),gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Honza and Malcom, Thanks a lot for help. L> --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
NULL vs.None
Question 1 I noticed in MySQL that if a table field has NULL value, then I can test in Python with that filed with None. In otherwords NULL in MySQL is the same as None. in Python Is it so or am I wrong? Question 2. I also would like to test NULL values in my templates. So I would like to use something like this: {% ifequal Price NULL %} . {%else%} . {% endifequal %} Is that possible? NULL doesn't work there neither None.What shall I use in the template to test NULL values in MySQL? Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Django and WSGI
I received a reply from Dreamhost: " However, I have been on the browser and your website is working now. So it doesn't sound like there is a configuration problem on the server, but I suspect that there may be an intermittent high load issue. Normally the system admins correct high load issues as they occur, but you may experience a slow load or even the site going down for a few moments. We address all server problems the second that we become aware of them, so that could account for your site going down for a small periods here and there. ..." So, they admit that the site was down beacuse of high load. Is it possible to use WSGI, FastCGI and Django for sites with high load? L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Announcing Tabblo, a Django app
I wanted to try it out but I can not sing up. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Dreamhost - does anyone know a better webhosting?
I have been using Dreanhost for share webhosting service for a few months already but I found out it is very unreliable. If there is a higher traffic my site goes down. From the beginnig I was happy - no problem - but now when more users come to my site - problems repeat all over and over again. Does anyone know a better webhosting? Or is it a problem of Django that brings very load on a server?? Thank you L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to prevent a page from being cached?
Malcom, thank you for the reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to prevent a page from being cached?
Hello Luke, Thank you for your reply.Unfortunatelly I use Python 2.3 so, I can not use decorators as you described. Is it possible to change HTTP headers ,in Django,in this way below? response= HttpResponseRedirect("/ChangeProductList/") response['Pragma'] = "no cache" response['Cache-Control'] = "no-cache,must-revalidate" response['Pragma'] = "no cache" response['Expires'] = "Wed, 11 Jan 2006 05:00:00 GMT" return response or how can I add /change HTTP headers in Django? (In Python it is very easy) Thank you for reply. L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to prevent a page from being cached?
Response looks like this 00:00.437 - server connected] HTTP/1.1 200 OK Date: Thu, 11 May 2006 09:07:37 GMT Server: Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e Vary: Cookie Content-Length: 5406 Connection: close Content-Type: text/html; charset=utf-8 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to prevent a page from being cached?
Is there a way how to prevent a page from being cached? I use response= HttpResponseRedirect("/ChangeProductList/") response['Pragma'] = "no cache" response['Cache-Control'] = "no-cache,must-revalidate" response['Pragma'] = "no cache" response['Expires'] = "Wed, 11 Jan 2006 05:00:00 GMT" return response but when I use a sniffer to check HTTP communication I can not see any Expires The header from the sniffer looks like this only GET http://www.adomain.cz/ChangeProductList/ HTTP/1.0 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application/x-icq, */* Referer: http://www.obchodujte.cz/ChangeProduct/17/ Accept-Language: en-us Proxy-Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Host: www.obchodujte.cz Pragma: no-cache Cookie: sessionid=f6a4320bbcc80c09b1027ee2522063c2; sessionid=f6a4320bbcc80c09b1027ee2522063c2 where can be a problem? Thank you for help. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Which is better: dreamhost or bluehost?
I also use Dreamhost, but recently not running well for me. I noticed that when more users log in, the site is down( timeouts) and I must ask Dreamhost support to correct the problem. Yesterday, it happened again, and I complained that the problem repeats all over and over again so they told me that they can move my site to another machine, if it happens again. If you have very, very few visitors, then Dreamhost is OK, I would say. Regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Question
Jorge, Thanks a lot for help.It works. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Question
I have a shop application where a user register the NameOfShop and the new shop is created for him. If he wants to see his shop he must use URL something like http://www.domain.com/shop/NameOfShop Is there a possibility to make the URL shorter that is - to remove shop name-. for example to use only http://www.domain.com/NameOfShop ? In my urls.py I use (r'^shop/(?P.*?)/','shopproject.apps.shop.views.shop.Index') but also (r'^TradeOffice/','shopproject.apps.shop.views.shop.TradeOffice'), so that I can not change simply (r'^shop/(?P.*?)/','shopproject.apps.shop.views.shop.Index') into (r'^(?P.*?)/','shopproject.apps.shop.views.shop.Index') So, is there any other way so that a user can refer to his shop http://www.domain.com/NameOfShop ? Thank you for reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Is it possible to use render_to_response in a child function
Joey , Thank you for the explanation Best regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Is it possible to use render_to_response in a child function
I have # def Parent(request): print "I am in parent" Child(request) return render_to_response('ParentResponse',) def Child(request): print "I am in child" return render_to_response('ChildResponse',) # >From Parent function I call Child function and I would like the Child function to show ChildResponse, see. return render_to_response('ChildResponse',) in Child function But it does NOT work. Only Parent response is shown.see. return render_to_response('ParentResponse') in parent function But why I can NOT see the ChildResponse?Is it possible to use return render_to_response in a child function? Thanks for reply. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Post-after-redirect question
Is there any difference if I use in my script a post-after-redirect that is HttpResponseRedirect (something like return HttpResponseRedirect("/ChangeProductList/") ) or if a user use REFRESH from his browser? I use my webhosting on Dreamhost and I found out that if I do a post-after-redirect in my script so that reload should work, the data is not changed completly - only text is changed but not a picture.But if I do REFRESH from my browser the date is changed completly - I can see the changed picture as well Thank you for your help. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: errors dictionary
Ivan,Thank you for your reply. Best regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Custom Manipulator
Ian, Thanks for your reply. I implemented custom manipulator for ADDing but do not know how to do that for CHANGING. class ProductManipulator(formfields.Manipulator):# ADD manipulator def __init__(self): . def save(self,data): .. # In my code I call it like this manipulator = ProductManipulator() then later new_trade = manipulator.save(new_data) where new_data are supplied by a user via a form. As to CHANGE manipulator, I do not know how to fill in (prepopulate)the form with the data, being changed, from the database. Any idea? Thanks for reply and help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: web hosting
I use Dreamhost and it works OK. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ANN:Woodlog Testing
Limodou, Thanks a lot for the explanation and help. Best regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ANN:Woodlog Testing
Limodou, Thanks a lot for your help. Now I understand much better. Best regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ANN:Woodlog Testing
Limodou, Thanks for replies. I am also working on a application that more users should be used by. So, I would like to learn a little more how to create url dynamicly( on fly). Can you please let me know where in you file(s) you make that. Thanks a lot L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ANN:Woodlog Testing
Limodou,thank you for your reply. I am sorry but I do not fully understand your answer You say that every user has his own blog but also that there is not user directory. But when I want to use my blog as a user, I have a different URL, e.i.a directory is also different, from another user. I would guess that every user must have a directory with some files.Or am I wrong? What is advantage of xmlrpc access that you implemented it? Thank you for your reply. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ANN:Woodlog Testing
Hello Limodou, It looks very nice. Can you please answer my question? What is the file rpc.py for? Does every user have his own blog in his directory? And what files must every user have in his directory and which can be common(the same )? Thank you for your reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Manipulator fields
In my program I use something like this: # ... for Field in manipulator.fields: #do something print Field . .. # print Field there can print the correct value that is e.g. but because Field is an instance I can not use that in further processing e.g. string.replace(Field ,'id=','disabled id=') Is there any solution to my problem that is how to replace any text in the Field? Thanks for reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Form field
Limodou, Thank you for your reply. But how can I extend the code, or how to change manipulators? Thanks for reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Form field
Is it possible to have a field in a form that a user can not edit? Thank you for reply Regards, L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to use form fields
Limodou, Thanks a lot.That is what I need. Regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to use form fields
I use a custom manipulator that creates field_names.These filed names can be a different. To create fields I use formfields.IntegerField(field_name="Pieces_"+`v`, maxlength=4) where Dynamic_value changes. Normaly, for static field, I can use in a form {{form.FieldName}}. If fileds are generated in a dynamic way, how can I use it in a form? For example my custom manipulator can create {{form.ID_1}} only but also {{form.ID_2}},{{form.ID_3}} ... etc. So, is there a list where all fields are? Thanks. L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to join two variables in a template
Is there a way to join two( or more) variables in templates? Thanks for reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Slice - built-in filter
Ivan,Thanks a lot It really works! L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Slice - built-in filter
I use SLICE filter. I t works ok, but when I try e.g. {{ some_list|slice:":2" }} where some_list is some_list=[1,2,3,4] I will get [1, 2]. Is it possible, via templates, to remove brackets? Thanks L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: LIKE operator
Ivan, Thank you for your reply and help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
LIKE operator
Is LIKE operator supported in Django? I would like to perform a pattern match. For example something like this: SELECT name FROM metal WHERE name LIKE '%er%', where name is a field of table . That above will return results that contain 'er' anywhere in a field name. Regards, B. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: information about django on dreamhost
I use Dreamhost with Django for some time already and I am happy with that.Works great! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to populate a form with multiple values
Kenneth,Thank you for your idea.It can be really better to use sessions. But now the biggest problem for me is that I can not display multiple values from the shopping cart in input fields of my form. Any idea? Thanks --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to populate a form with multiple values
Limodou, Thanks for your reply and your comments. But still I do not know how to transfer data from the shopping cart into a form Can you advise? Thanks L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to populate a form with multiple values
Kenneth, Thank you for your reply. I have a table that stores a shopping cart. But do you think that storing the shopping cart in a dictionary in the session would be a better solution? Thank you for the 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to populate a form with multiple values
Limodou, Thank you for your reply. And do you have any idea how FormWrapper should be used? In my shop project I need to provide a feature to a user , when he does/finish shopping to be able to check all items in his basket.In other words, he will see all items he has put into the basket so far. The form should be something like this: # Item1 Quantity1(input field so that the user can change that) Item2 Quantity2(input field so that the user can change that) Item3 Quantity3(input field so that the user can change that) ... ... ... . Submit button # Thank you for your reply L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
ChangeManipulator
Is there a possibility to use ChangeManipulator for several items together at one go? To explain: for get_list_results( that consists several records) I need to offer a user a possibility to see the value of each item. In my template I have # {%for item in get_list _result%} {{form.item}} {%endfor%} and I need all input names(input type="text" name="{{ item.id}}" from the example above), to receive value - the value that is copied from the table, as usual when I use ChangeManipulator(objectID) in my view Is that possible? Thanks B. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to solve this ?
Kenneth,Thank you for your reply.I checked the link but it describes inline editing.It was my fault that I did not explain properly.I am sorry about that. All that I want is to have in a form input fields (data) from a different tables that are linked via a ForeignKey.In the example above Product table is linked with Category table via a ForeignKey productkey, see productkey=meta.ForeignKey(Category). Is that possible? Thank you for the reply Regards, L. ΒΆ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to solve this ?
Kenneth,thank you for your reply. The whole model looks like this # from django.core import meta class User(meta.Model): Login=meta.CharField(maxlength=50,unique=True) Password=meta.CharField(maxlength=30,blank=True) Email=meta.EmailField(_('e-mail address'),blank=True) RealName= meta.CharField(maxlength=70,blank=True) Company= meta.CharField(maxlength=70,blank=True) Address= meta.CharField( maxlength=200,blank=True) Zip= meta.CharField(maxlength=5,blank=True) DateOfJoined=meta.DateTimeField(auto_now_add=True) Phone= meta.CharField( maxlength=25,blank=True) Fax= meta.CharField(maxlength=25,blank=True) Notes=meta.TextField(blank=True) PaidUser=meta.IntegerField(blank=True,null=True)#0 not paid def __repr__(self): return self.Login class META: admin = meta.Admin( search_fields = ['Login'], ) class Category(meta.Model): CategoryName=meta.CharField(maxlength=100,unique=True) CategoryDescription=meta.CharField(maxlength=200,blank=True) Priority=meta.IntegerField(maxlength=6,blank=True,null=True) Subcategory= meta.IntegerField(maxlength=6,blank=True,null=True) Date=meta.DateTimeField(auto_now_add=True) categorykey=meta.ForeignKey(User) def __repr__(self): return self.CategoryName class META: admin = meta.Admin( search_fields = ['CategoryName'], ) class Product(meta.Model): PictureNo=meta.CharField(maxlength=10,blank=True) Name=meta.CharField(maxlength=100,blank=True) Description=meta.TextField(blank=True) Price=meta.IntegerField(maxlength=6,blank=True,null=True) Vat=meta.IntegerField(maxlength=4,blank=True,null=True) TypeofPromotiont=meta.CharField(maxlength=50,choices=(('Normal','Normal'),('New','New'),('Action','Action'),('Discount','Discount'))) Date=meta.DateTimeField(auto_now_add=True) productkey=meta.ForeignKey(Category) def __repr__(self): return self.Name class META: admin = meta.Admin( search_fields = ['Name'], ) class OrderList(meta.Model):#all orders that a user placed ProductNo=meta.CharField(maxlength=10) Description=meta.TextField(blank=True) Date=meta.DateTimeField(auto_now_add=True) orderlistkey=meta.ForeignKey(User) def __repr__(self): return self.ProductNo class META: admin = meta.Admin( search_fields = ['Name'], ) class Order(meta.Model): Name=meta.CharField(maxlength=100,blank=True) Description=meta.TextField(blank=True) Price=meta.IntegerField(maxlength=6,blank=True,null=True) Vat=meta.IntegerField(maxlength=4,blank=True,null=True) Pieces=meta.IntegerField(maxlength=6,blank=True,null=True) Date=meta.DateTimeField(auto_now_add=True) orderkey=meta.ForeignKey(User) def __repr__(self): return self.Name class META: admin = meta.Admin( search_fields = ['Name'], ) ## Does this make already sense? Thank you for the reply Regrads, L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to solve this ?
If I add some data to one table, via a form, will be this data shown in another form that uses a different table? To explain in detail: I have this model ### .. .. class Category(meta.Model): CategoryName=meta.CharField(maxlength=100,unique=True) CategoryDescription=meta.CharField(maxlength=200,blank=True) Priority=meta.IntegerField(maxlength=6,blank=True,null=True) Subcategory= meta.IntegerField(maxlength=6,blank=True,null=True) Date=meta.DateTimeField(auto_now_add=True) def __repr__(self): return self.CategoryName class META: admin = meta.Admin( search_fields = ['CategoryName'], ) class Product(meta.Model): PictureNo=meta.CharField(maxlength=10,blank=True) Name=meta.CharField(maxlength=100,blank=True) Description=meta.TextField(blank=True) Price=meta.IntegerField(maxlength=6,blank=True,null=True) Vat=meta.IntegerField(maxlength=4,blank=True,null=True) TypeofPromotiont=meta.CharField(maxlength=50,choices=(('Normal','Normal'),('New','New'),('Action','Action'),('Discount','Discount'))) Date=meta.DateTimeField(auto_now_add=True) productkey=meta.ForeignKey(Category) def __repr__(self): return self.Name class META: admin = meta.Admin( search_fields = ['Name'], ) When I add a new Category I need to make a possible for a user to be able to choose that category for the Product that he is being inserted.Is that possible in Django? Thank you for your reply Regards, L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Comments module
Does anyone use successfully Comments module(django.contrib.comments). I followed tutorial about blog at http://www.rossp.org/blog/2006/jan/23/building-blog-django-1/ but the blog that uses comments module does not work properly for me. If I post a comment that comment is shown in all tags. Can anyone explain why or where can i learn something more about comments module? Thank you B.L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to find out id of the first record?
Thank you all for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
How to find out id of the first record?
Hi, is there a way how to find out id of the first record in a table? I will explain what I mean. When I insert the first record into a table the id is 1. when I insert next record, the id for this record will be 2. But if I delete the first record, the id of the first record will be 2 .So, I need to find out the id of the first record. Is it possible? Thank you for help L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Attn. Dreamhost users
Eugene, thank you for your reply. You say" If you run several web sites from one account, you cannot tell which process serves a given web site. I kill all of them" But how can I kill ALL of them? One by one something like: kill processNumber ? Thank you for reply L --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Attn. Dreamhost users
Eugine, I also use Dreamhost( and it works great) but have a problem how to kill the correct process. When I try "killall python" or "killall python2.4" I receive "no process killed". Why? When I use ps ax to see the process number, I can see a lot of /usr/bin/python django.fcgi and I do not know what is the right process to be killed.Any idea? Thank you for help Regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Dreamhost - agh!
I also use Dreamhost without any problems.I think my Django projects run on avalon server Regards, L. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How to find the label for a value
Luke, Thanks for your reply.But I am not sure I fully understand your reply. (I might have put my question in a not clear way). All that I need is to render the user's choice so that in a template there is no value but the label. E.g. the new_data( taken from a form ) may be like this: {'Password1': ['bb'], 'Fax': [''], 'Drop-Down Menu': ['2'], 'Login2': ['[EMAIL PROTECTED]'],} where Drop-Down Menu loks like this > Choice 1 > Choice2 > and I need to put in a template "Choice2" not "2". Is it possible? Thanks for help Regards, L.
Re: Is there a solution in Django?
Jakub, Thanks for your reply. I found out that I can not use ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci after I create the database. If I do not, then I can use utf-8 coding and it works well.However, I do not know why.:-( Regards, L.
Is there a solution in Django?
Hi Because I use non English characters I used: ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci but now, when I want to insert some values into the database, I get the error: (1267, "Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='") How can I solve that? Thank you for help L.B.
How to use non English characters in templates
Hello , In my model I use fields that can have a string of non-English characters. To explain: I use choices option in my model definition like this: Kraj = meta.CharField(choices=Krajlist,maxlength=20,blank=True) where Krajlist consists the non-English characters. So, I fill in the correct ( non English characters) values in Krajlist and it looks correct in my editor.But when I use the variable {{form.Kraj}} in my template, the characters in a view, are not correct. Where is a problem? Thank you for help L.
Re: Can not start admin on production server
Thanks a lot.That works !