Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: UnicodeEncodeError

2010-10-04 Thread roboter
import sys ret = sys.getdefaultencoding() if ret == 'ascii' modify /python/site.py setencoding function set encoding = "utf-8" On 10月1日, 下午9时09分, Klaas van Schelven wrote: > Hi all, > > I just ran into the same problem. Locally it doesn't occur, but it > does

Re: What's the best way to implement project permissions in a project management app?

2010-10-04 Thread Mike Dewhirst
On 5/10/2010 11:32am, Stodge wrote: What's the best way to implement project permissions in a project management app? Should I just create the concept of membership and have a function is_member on the project model? Have a look at django-todo. A quick read the other day indicated to me

What's the best way to implement project permissions in a project management app?

2010-10-04 Thread Stodge
What's the best way to implement project permissions in a project management app? Should I just create the concept of membership and have a function is_member on the project model? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Better Django projects monitoring

2010-10-04 Thread LD
Hi Djangofans, We have posted instructions how to integrate Django with AlertGrid for better controlling for your Django based projects. http://alert-grid.com/integrations/frameworks/django/ It allows to upgrade standard email-on-error mechanism as well as can help monitor your critical

Re: unique constraint

2010-10-04 Thread Shawn Milochik
1. http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together 2. If you're using a foreign key to a User instance then duplicate names aren't a problem. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

unique constraint

2010-10-04 Thread mark jason
hi, I am using a form to capture user entered values of urls to websites.I need to create a model with fields 1.url-charfield 2.creator_of_entry-foreignkey(User) I am taking the creator as the logged in user,and can get his name. I need to restrict the user from entering the same url again.How

Re: newbie question

2010-10-04 Thread mark jason
thanks guys mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options,

Django: MultipleChoiceField in admin to carry over previously saved values

2010-10-04 Thread Kasper
See the story here: http://stackoverflow.com/questions/3856163/django-multiplechoicefield-in-admin-to-carry-over-previously-saved-values It looks like the 'initial' values are not getting to the actual widget, because when debugging final_attrs in widget, it remains empty. I am starting to

Re: Something breaking if tag

2010-10-04 Thread derek
Remember that Django is "just" Python under the hood and that Python, like any other self-respecting language, will always treat different types as being, well, different! On Sep 29, 10:14 pm, aa56280 wrote: > Thanks for that. I figured it was something along those lines. I >

Re: Makemessages with Templates - Not Working

2010-10-04 Thread nsbk
Hi, Something similar is happening to me. I tried to run django-admin.py makemessages -l es and then compilemessages from the root of my templates folder (which is outside the project tree) and it creates the file Templates/conf/locale/es/LC_MESSAGES/django.po / django.mo correctly. My problem

Re: upload_to vs FileSystemStorage

2010-10-04 Thread Stodge
If I do upload_to=os.sep, I get an error: Attempted access to '/test.pdf' denied. It's trying to upload to the root of the drive! settings.DOCUMENT_STORE_PATH is something like /var/www/testproject/ documents file =

cannot find django.core.management

2010-10-04 Thread jimgardener
hi In my django app I wanted to use some task scheduling .So ,i built and installed celery from celery-2.0.3.tar.gz.Then later I found a blog about django-celery and ghettoq at http://bitkickers.blogspot.com/2010/07/djangocelery-quickstart-or-how-i.html I installed those two through easy-install

Re: convert list into a comma separated string

2010-10-04 Thread ashy
Hi All, my code is as below: li = ['2l','1l'] str = ",".join(li) but print str does not work for me :( -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: apache reload

2010-10-04 Thread Tim Sawyer
On Oct 3, 5:39 pm, Олег Корсак wrote: Hello. I'm using mod_wsgi 3.3 + apache 2.2.16 on Gentoo Linux box. Is it possible to make apache kinda "reload"/"re-read"/"re-compile" python files from my django code every time they are changed? Yes. You get get

urls and form

2010-10-04 Thread Tonton
hello i use this form to have a choice list and change to another on select {{carte.titre}} {% for carte in latest_carte_list %} {{carte.titre}} {% endfor %} and it is return a url like http://mywebsite/cartes/?=id This

Re: Django Tutorial

2010-10-04 Thread Tim Reischmann
I am in the same position as you only two weeks further ahead :) I'd suggest starting with this one https://www.packtpub.com/django-1-0-website-development-2nd-edition/book and then moving on to http://www.amazon.com/Definitive-Guide-Django-Development-Right/dp/1590597257 be sure if you're

Re: convert list into a comma separated string

2010-10-04 Thread cajbe
more like a python question :) >>> li = ['a', 'b', 'c'] >>> ','.join(li) 'a,b,c' Va salut, CRISTEA, Adrian Software developer On Mon, Oct 4, 2010 at 2:41 PM, ashy wrote: > Hi All, > > I am writing a django function in which I have a following list: > li =

Re: convert list into a comma separated string

2010-10-04 Thread Aaron Sterling
On Mon, Oct 4, 2010 at 1:41 AM, ashy wrote: > Hi All, > > I am writing a django function in which I have a following list: > li = ['a','b','c'] > I want to create a string from the list which should look like > str = 'a,b,c' > > string_ = "".join(li) str is a built in

Re: Django Tutorial

2010-10-04 Thread Sithembewena Lloyd Dube
IMHO, you'd be better off starting with the official documentation and tutorial. Both are kept up to date. http://docs.djangoproject.com/en/1.2/ http://docs.djangoproject.com/en/1.2/intro/tutorial01/#intro-tutorial01 On Mon, Oct 4, 2010 at 11:10 AM, parameswar wrote: >

Re: convert list into a comma separated string

2010-10-04 Thread Scott Gould
Python has you covered: my_string = ",".join(my_list) HTH, Scott On Oct 4, 7:41 am, ashy wrote: > Hi All, > > I am writing a django function in which I have a following list: > li = ['a','b','c'] > I want to create a string from the list which should look like > str =

Re: convert list into a comma separated string

2010-10-04 Thread Shawn Milochik
','.join(your_list) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options,

convert list into a comma separated string

2010-10-04 Thread ashy
Hi All, I am writing a django function in which I have a following list: li = ['a','b','c'] I want to create a string from the list which should look like str = 'a,b,c' I plan to pass this string to not in () function of my sql query. Any Ideas? thanks ashy -- You received this message

Re: convert list into a comma separated string

2010-10-04 Thread Carlton Gibson
On 4 Oct 2010, at 12:41, ashy wrote: > I am writing a django function in which I have a following list: > li = ['a','b','c'] > I want to create a string from the list which should look like > str = 'a,b,c' ','.join(li) Regards, Carlton -- You received this message because you are subscribed

Django Tutorial

2010-10-04 Thread parameswar
Hi, i am a newbie to the django framework. I would like to know the best book which can guide me in django. A very basic book shall be helpful ! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: convert list into a comma separated string

2010-10-04 Thread ashwin morey
Hi, I am using django development server and not apache. But the print str is not working. I tried changing str to s, but no luck. thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Why can't I use this model architecture?

2010-10-04 Thread derek
As per the fine manual: http://docs.djangoproject.com/en/dev/ref/django-admin/#syncdb "Syncdb will not alter existing tables syncdb will only create tables for models which have not yet been installed. It will never issue ALTER TABLE statements to match changes made to a model class after

Re: apache reload

2010-10-04 Thread Chris Lawlor
One approach is to set "MaxRequestsPerChild" to one, basically forcing the server to reload on every request. Probably not the most efficient way to accomplish this, but almost certainly the most simple to implement. On Oct 3, 5:39 pm, Олег Корсак wrote: >

Re: ERP application on Django

2010-10-04 Thread derek
Have a look at this discussion - it has some useful pointers: http://stackoverflow.com/questions/886221/does-django-scale as does this blog entry on Django/Postgresql: http://www.davidcramer.net/code/django/6939/scaling-threaded-comments-on-django-at-disqus.html which relates to:

Re: Adding help text to Django admin

2010-10-04 Thread Martin Melin
On Mon, Oct 4, 2010 at 10:46 AM, Sithembewena Lloyd Dube wrote: > Greetings folks, > > I need to add "help text" to a Django admin. Sort of like the text below > fields in the Django Redirects app. to provide a snippet of information > about each field. > > How can I achieve

Re: convert list into a comma separated string

2010-10-04 Thread Shawn Milochik
On Oct 4, 2010, at 9:27 AM, ashwin morey wrote: > Hi, > > I am using django development server and not apache. But the print str is not > working. > I tried changing str to s, but no luck. > > thanks I think you would benefit greatly from doing a Python tutorial.

Re: Checkbox registration from

2010-10-04 Thread craphunter
still don't get it. what do I have to type in my template?! tia craphunter On 29 Sep., 22:30, aa56280 wrote: > You'll have to use the RegistrationFormTermsOfService class instead of > RegistrationForm. -- You received this message because you are subscribed to the Google

Re: newbie question

2010-10-04 Thread Chris Lawlor
Also, one way to integrate scripts like this is to write them as django management commands, so you can run them as 'python manage.py yourcommand'. Management commands are pretty well documented in the django docs, you should have no trouble finding enough info to get started. Again, good luck

Re: Django Tutorial

2010-10-04 Thread Carlton Gibson
On 4 Oct 2010, at 10:10, parameswar wrote: > Hi, i am a newbie to the django framework. I would like to know the > best book which can guide me in django. A very basic book shall be > helpful ! I recommed Django: The Definitive Guide (get the "Updated for 1.1" version) Regards, Carlton --

Re: Adding help text to Django admin

2010-10-04 Thread Sithembewena Lloyd Dube
Ah, easy as eating pie. Thanks folks! On Mon, Oct 4, 2010 at 11:01 AM, Tim Sawyer wrote: > Set help_text on the appropriate model field > > name = models.CharField(max_length=100, help_text='Current name of band') > > Tim. > > > On 04/10/10 09:46, Sithembewena Lloyd

Re: Get simple data from form

2010-10-04 Thread Daniel Roseman
On Oct 3, 11:15 am, petarda wrote: > Sorry, that I was so brief. > It is a modeform: > form = modelform(instance=object) > instantiated after click on detail of brand for update this brand. > But, First I need only get and view raw data from form.. like title, > description

Re: Django for internationalized sites - are models.User internationalized?

2010-10-04 Thread Tom Evans
On Sat, Oct 2, 2010 at 9:19 AM, Andy wrote: > > On Oct 2, 3:27 am, Torsten Bronger > wrote: >> > But real email addresses do contain those characters: >> >http://en.wikipedia.org/wiki/Email_address#Internationalization >> >> I read

Re: mod_wsgi + mod_php = segmentation fault

2010-10-04 Thread Олег Корсак
no mod_python, only mod_wsgi and mod_php 04.10.2010 02:33, Srik пишет: > Is mod_python enabled by any chance ?. Running both mod_python & > mod_wsgi can cause similar errors sometimes. > > On Oct 3, 3:54 pm, Олег Корсак > wrote: >> Hello. I'm using apache

Re: Django Tutorial

2010-10-04 Thread Thomas Weholt
On Mon, Oct 4, 2010 at 2:57 PM, Sithembewena Lloyd Dube wrote: > IMHO, you'd be better off starting with the official documentation and > tutorial. Both are kept up to date. > > http://docs.djangoproject.com/en/1.2/ >

newbie question

2010-10-04 Thread mark jason
hi I am quite new to django ..I have written a web app that takes user input and adds customer details to db. I store customer name,email ,a datetime value for each customer. When the application starts ,I want a utility program to check the db and if system datetime matches the datetime value

Re: Adding help text to Django admin

2010-10-04 Thread Tim Sawyer
Set help_text on the appropriate model field name = models.CharField(max_length=100, help_text='Current name of band') Tim. On 04/10/10 09:46, Sithembewena Lloyd Dube wrote: Greetings folks, I need to add "help text" to a Django admin. Sort of like the text below fields in the Django

Adding help text to Django admin

2010-10-04 Thread Sithembewena Lloyd Dube
Greetings folks, I need to add "help text" to a Django admin. Sort of like the text below fields in the Django Redirects app. to provide a snippet of information about each field. How can I achieve this? -- Regards, Sithembewena Lloyd Dube http://www.lloyddube.com -- You received this

Re: Include form in template tag

2010-10-04 Thread olivergeorge
Hey Anton Thanks for this. I had the same problem and your "..forms" style import statement solved it. I'd love to get to the bottom of why this is necessary - something in how tags are loaded I guess. cheers, Oliver On Sep 24, 12:41 am, Anton Danilchenko wrote:

Re: Python Restarting After Every Request, MaxRequests Per Child is High

2010-10-04 Thread Reinout van Rees
On 10/03/2010 07:54 PM, Koobz wrote: I'm getting about 0.5 requests per second using apache, and about 60 using the development server so something is definitely wrong :) After every requests I see: [Sun Oct 03 11:48:52 2010] [info] mod_wsgi (pid=27761): Python has shutdown. [Sun Oct 03

Re: newbie question

2010-10-04 Thread Martin Melin
On Mon, Oct 4, 2010 at 8:25 AM, mark jason wrote: > hi > I am quite new to django ..I  have written a web app that takes user > input  and adds  customer details to db. > I store customer name,email ,a datetime value for each customer. > > When the application starts ,I

Re: Configuring URLs for different views

2010-10-04 Thread simon_saffer
Thanks a lot for all your answers. It turned out that what I'd done above worked but in the template I was trying to load there was a typo. I had written: {% extends base.html %} instead of {% extends "base.html" %} Anyway it was a good thing I posted my question so that I could get your ideas