Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread Able
setuptools 2009/12/23 ericvb > Can you point to that thread please? I've searched but can't find it. > > -- > > 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 unsubscr

Re: Generic Inlines in Admin - Causes Parent model to disappear in Admin

2009-12-23 Thread Daniel Roseman
On Dec 23, 5:41 am, Victor Hooi wrote: >     class AddressInline(generic.GenericTabularInline): >         models = Address Is that just a typo here, or do you actually have it as 'models' in your code? It should be 'model'. Change that and see if it fixes your problem. -- DR. -- You received t

Newbie help with namespaces in urls.py

2009-12-23 Thread Martyn
Hey, I'm new to django, so please excuse me for asking simple questions for a bit. I've installed django and have followed through a few of the simpler tutorials and have decided it's time to brave the world by myself...and have fallen at the first hurdle. I have a website with a urls.py and a v

admin interface, foreign keys and subclasses

2009-12-23 Thread Chris Curvey
this may be beyond the current abilities of the Django auto-generated admin interface, but I thought I'd ask... I have a class called "Customer" which has a one-to-many relationship with "ServiceRequest". I've got that all working through the admin interface and it's working fine, like this: cla

Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread OkaMthembo
Hi Eric, Apologies, i can't seem to find the exact thread (it was in response to someone else's enquiry). However, i do remember that i downloaded the MySQLdb package from this link: http://sourceforge.net/projects/mysql-python/files/ Expand the mysql-python folder and expand the 1.2.2. folder.

Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread OkaMthembo
Correction: that was a module that i downloaded, not a package. On Wed, Dec 23, 2009 at 4:12 PM, OkaMthembo wrote: > Hi Eric, > > Apologies, i can't seem to find the exact thread (it was in response to > someone else's enquiry). However, i do remember that i downloaded the > MySQLdb package from

Form field required only if other fields are filled

2009-12-23 Thread Maksymus007
How to impelement such a functionality? I would like to provide full field validation but only if other field is filled - for example checkbox is checked. I start with class Form: field = forms.Field(required=False) but would like to change this to True in some cases at runtime. I know I can u

Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread OkaMthembo
Correction: it was an installer, not package, that i downloaded.I went with the .exe, which extracts the MySQLdb module into the relevant site-packages folder of your Python installation. Lloyd On Wed, Dec 23, 2009 at 4:12 PM, OkaMthembo wrote: > Hi Eric, > > Apologies, i can't seem to find the

Re: Generic Inlines in Admin - Causes Parent model to disappear in Admin

2009-12-23 Thread Victor Hooi
heya, Yeah, that was actually it...lol...how silly. Changed 'models' to 'model', works now =). Thanks heaps for that. Otherwise, is this the right way of setting up these relationships, the way I'm doing it? And the right way to use the admin? Cheers, Victor On Dec 23, 10:16 pm, Daniel Roseman

Re: get_absolute_url not recognized

2009-12-23 Thread Alex Robbins
Is the second line of your url function outdented? Maybe python thinks your class is finished at that point? You could try indenting it? If that doesn't fix it I would drop the decorator for now to see if that fixes it. Then you could try dropping the body of the get_absolute_url function and repl

Unicode name of field in form

2009-12-23 Thread Andrij Skalyuk
I am trying to create field in form with name "Ø" (special danish characters). My code is something like this: field = forms.CharField() form.fields[smart_unicode("Ø")] = field After that i got exception in django during validation: File "\django\forms\forms.py", line 233, in full_clean if h

Re: super() argument 1 must be type, not None

2009-12-23 Thread TiNo
I am overriding a save function of a model with the following code: def save(self, *args, **kwargs): if (not self.id) and self.email != '': self.create_user() if hasattr(self, 'user'): self.user.email = self.email self.user.first_name = self.

Re: Newbie help with namespaces in urls.py

2009-12-23 Thread Bill Freeman
Do you have an __init__.py file in zombie_django/battleships ? It is allowed to be empty, but it must be there for python to consider the folder to be a "package" (folder of modules and sub-packages). See the documentation and tutorials at python.org On Wed, Dec 23, 2009 at 7:29 AM, Martyn wrot

Re: Unicode name of field in form

2009-12-23 Thread Bill Freeman
I think that you need to pass the label as the "label" argument to forms.CharField: field = forms.CharField(label="Ø") or: field = forms.CharField(label=smart_unicode("Ø")) On Wed, Dec 23, 2009 at 9:54 AM, Andrij Skalyuk wrote: > I am trying to create field in form with name "Ø" (specia

Re: super() argument 1 must be type, not None

2009-12-23 Thread Bill Freeman
Are you sure that Lid is defined in this context? Try putting: import pdb;pdb.set_trace() before the super and check. On Wed, Dec 23, 2009 at 10:41 AM, TiNo wrote: >> I am overriding a save function of a model with the following code: >> >>     def save(self, *args, **kwargs): >>         if (n

Re: Unicode name of field in form

2009-12-23 Thread Andrij Skalyuk
Thanks for reply. But what should i do with names of fields ? Replace unicode characters with some English ? I really want to keep unicode characters for names of fields, because it is easy to manage without any replacement. On Dec 23, 5:51 pm, Bill Freeman wrote: > I think that you need to pass

Table Names and Foreign Keys

2009-12-23 Thread V64
class Register(models.Model): name = models.CharField(unique=True, max_length=48, db_column='name', blank=True) title = models.CharField(max_length=48, blank=True) firstname = models.CharField(max_length=48, blank=True) class Meta: db_table = u'Register' class Charity(mode

Re: Unicode name of field in form

2009-12-23 Thread Bill Freeman
I haven't done any python programing with variable, function, class, and attribute names containing non-ASCII characters, so I don't know whether there is support for them, or how good it is. If you can't say: Ø = forms.CharField() Then I think it's going to be down hill from there. Templat

Re: super() argument 1 must be type, not None

2009-12-23 Thread TiNo
On Wed, Dec 23, 2009 at 16:53, Bill Freeman wrote: > Are you sure that Lid is defined in this context? Try putting: > > import pdb;pdb.set_trace() > > before the super and check. > As I described, I checked that. The strange thing is, that it is defined as ``None``. As are all other imports, as

Re: super() argument 1 must be type, not None

2009-12-23 Thread Doug Blank
On Wed, Dec 23, 2009 at 11:15 AM, TiNo wrote: > On Wed, Dec 23, 2009 at 16:53, Bill Freeman wrote: >> >> Are you sure that Lid is defined in this context?  Try putting: >> >> import pdb;pdb.set_trace() >> >> before the super and check. > > As I described, I checked that. The strange thing is, tha

Re: get_absolute_url not recognized

2009-12-23 Thread Doug Blank
On Tue, Dec 22, 2009 at 2:21 PM, neridaj wrote: > I'm trying to add a get_absolute_url method to a Tweet model from > django-syncr and do not understand why the method is not recognized. > > class Tweet(models.Model): >    pub_time    = models.DateTimeField() >    twitter_id  = models.PositiveInte

Premature end of script headers

2009-12-23 Thread Martyn
Hey, I'm getting a 'Premature end of script headers' issue when I'm submitting post data, and I'm not sure why. if I hit the page up normally, it works fine, if I post a form to the same url it borks. Anyone know why? I'm searched for a while now and not found anything relevant. Thank you, Ma

Re: Newbie help with namespaces in urls.py

2009-12-23 Thread Martyn
Ah ha...yes - thank you. M On Dec 23, 3:46 pm, Bill Freeman wrote: > Do you have an __init__.py file in zombie_django/battleships ?  It is allowed > to be empty, but it must be there for python to consider the folder to be > a "package" (folder of modules and sub-packages). > > See the documenta

Re: Premature end of script headers

2009-12-23 Thread Shawn Milochik
Can you post your view? It's illegal for us to hack into your computer and look at your code to figure out the problem. I'm assuming that you have an if statement that checks for a POST. In that block, is there anything *not* done that's done during the GET? Shawn -- You received this message

Re: super() argument 1 must be type, not None

2009-12-23 Thread Hanne Moa
2009/12/22 TiNo : > /../ for some reason it throws the > following error since a while (don't know since when, don't know what > changed, can't find anything suspicious in hg log...) "super() argument 1 > must be type, not None". When I run with pdb.set_trace as the first line of > the save method

Re: Table Names and Foreign Keys

2009-12-23 Thread Peter Rowell
What rev are you running? I just tried this on Ubuntu 9.04 with Django 1.1.1 and got the following SQL generated. It looks right to me. ./manage.py sql test BEGIN; CREATE TABLE `Register` ( `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `name` varchar(48) NOT NULL UNIQUE, `title` va

Re: debugging cache

2009-12-23 Thread Peter Rowell
> CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True I know this is a silly question, but have your tried this *as an anonymous user*? I ask because it's easy to forget you are logged in. When in doubt use something like Firefox's Web Developer Toolbar and clear all the cookies for your test site. -- You re

Re: django hosting

2009-12-23 Thread Peter Rowell
And your question is ...? This looks like fairly vanilla FastCGI setup instructions. -- 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

Re: Premature end of script headers

2009-12-23 Thread Peter Rowell
> I'm getting a 'Premature end of script headers' issue when I'm > submitting post data, and I'm not sure why. There's a good chance there are errors in the code that executes when there is POST data. Try running this under the development server and look for error messages on the console. Debuggi

Re: Table Names and Foreign Keys

2009-12-23 Thread V64
Peter I (think) I am running 1.1.1 on Python 2.4 Yes, the SQL printed out by 'manage.py sql app' looks, as you say, correct. I get the same SQL on my system. It would appear that the 'ALTER TABLE ...' changes the table name to be in lower case! On Dec 23, 5:53 pm, Peter Rowell wrote: > What r

Safety Properties and Consistency Issues

2009-12-23 Thread Pamela Bhattacharya
Hi, I wanted to know where I can get information about how Django guarantees consistency and details about local safety properties. 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-us...@google

Re: LDAP-groups problem

2009-12-23 Thread Wayne
Hi, Many thanks for your reply. I did the test and it seemed that our network is working fine and I could telnet to the directory with "Connected" feedback. What other things we could try next? Wayne > > Ralf: $ telnet ldap.example.com 636 > Trying 1.2.3.4... > Connected to ldap.example.com.

Re: LDAP-groups problem

2009-12-23 Thread Peter Herndon
On Dec 23, 2009, at 3:00 PM, Wayne wrote: > Hi, > > Many thanks for your reply. > > I did the test and it seemed that our network is working fine and I > could telnet to the directory with "Connected" feedback. What other > things we could try next? > Our next step is to work out how to make

Thanks for (Geo)Django

2009-12-23 Thread Ariel Nunez
I just saw a commit referencing the new geography column support on Postgis and felt the urge to drop a public thank you note to Justin and all the other folks behind GeoDjango and Django. (Geo)Django has done a lot for me in the past 3 years, not only becoming a source of income; but, more import

Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread ericvb
Thank you. Unfortunately, it hasn't worked for me; been there a few times in my searches :( For others finding this I could not get MySQLdb to work on Windows 7 with Python 2.5 but have managed to get it to work with Python 2.4. On Dec 23, 6:19 am, OkaMthembo wrote: > Correction: it was an in

Delegating cascade deletes to the database?

2009-12-23 Thread Christophe Pettus
Right now, if an object is deleted in the ORM, Django emulates ON CASCADE DELETE behavior, and deletes "child" objects such that there are no dangling foreign keys as a result of the delete. Is there a way of delegating that to the database, and actually using the database's own ON CASCADE D

Re: super() argument 1 must be type, not None

2009-12-23 Thread TiNo
On Wed, Dec 23, 2009 at 17:31, Doug Blank wrote: > Perhaps this is a cyclic Python import issue. I think Python will go > through a file twice, the first time getting names into the scope, and > then a second time to fill in the details. Perhaps you are still in > the middle of importing when you

Re: Premature end of script headers

2009-12-23 Thread Graham Dumpleton
On Dec 24, 4:13 am, Martyn wrote: > Hey, > > I'm getting a 'Premature end of script headers' issue when I'm > submitting post data, and I'm not sure why. > > if I hit the page up normally, it works fine, if I post a form to the > same url it borks. > > Anyone know why?  I'm searched for a while

copied change_form load problems

2009-12-23 Thread maxweld
I am following the first project in Practical Django Projects (2nd Edition) by James Bennett, and when trying to add the TinyMCE editor have encountered a problem that has me stumped. I have copied /django/contrib/admin/templates/admin/change_form.html to /myproject/templates/admin/flatpages/flatp

Re: Safety Properties and Consistency Issues

2009-12-23 Thread Daniel Roseman
On Dec 23, 6:56 pm, Pamela Bhattacharya wrote: > Hi, > > I wanted to know where I can get information about how Django > guarantees consistency and details about local safety properties. > > Thanks Er, what? Consistency in what? Safety where? -- You received this message because you are subscri

Re: copied change_form load problems

2009-12-23 Thread Daniel Roseman
On Dec 23, 11:14 pm, maxweld wrote: > I am pretty sure that it is not loading the custom template tags > {{ load i18n admin_modify adminmedia %} If that's a cut and paste, you have the opening tag wrong: it should be {% -- DR. -- You received this message because you are subscribed to the Googl

New to Django

2009-12-23 Thread datta
Hi, I just decided to build my web application in Django some 10 minutes ago. (Don't ask me "why?". For the curious mind, it is a random decision because I like Python). Can someone tell me if: 1. Can I do everything I can do in PHP (like maintaining sessions, etc.) using Django ? 2. How can I ch

Re: New Guide to Django install on fresh VPS

2009-12-23 Thread LarryEitel
I have made more progress on this. For any interested I now have it on a published google doc: http://docs.google.com/View?id=ddbbmdr8_12gv8ccdgs Now I would like to cut my teeth on installing memcached. :) -- You received this message because you are subscribed to the Google Groups "Django use

Re: New Guide to Django install on fresh VPS

2009-12-23 Thread Dattatreya M
Awsome, Larry. If I can catch up with the basics, I sure will like to work with you (in case you need more hands). Regards, D Dattatreya Mellacheruvu Graduate Student, Bioinformatics, The University of Michigan, Ann Arbor. `The Strongest Principle of growth lies in human choice` ~ George Eliot (

Re: New to Django

2009-12-23 Thread Shawn Milochik
What's wrong with the official tutorial? Or have you already done it and are looking for something new? If the latter, why not do a project you invent, and post here for help when you get stuck. Yes, you can maintain sessions and all that. I don't think there's anything you can do with PHP that

Re: New to Django

2009-12-23 Thread Ray
On Dec 24, 10:32 am, datta wrote: > Hi, I just decided to build my web application in Django some 10 > minutes ago. (Don't ask me "why?". For the curious mind, it is a > random decision because I like Python). great! > Can someone tell me if: > > 1. Can I do everything I can do in PHP (like mai

Re: New to Django

2009-12-23 Thread Dattatreya M
1. @Shawn, Thanks for the reply. I appreciate you taking time to answer. 2. I am going through the Django tutI was wondering if there is something else that would save me hours of 're-inventing' the wheel (with regards to designing websites using Django). (cook book/ for 'dummies' kind of a th

Re: New Guide to Django install on fresh VPS

2009-12-23 Thread Leonel Nunez
> I have made more progress on this. For any interested I now have it on > a published google doc: http://docs.google.com/View?id=ddbbmdr8_12gv8ccdgs > > Now I would like to cut my teeth on installing memcached. :) > > -- > > You received this message because you are subscribed to the Google Groups

Re: New to Django

2009-12-23 Thread Dattatreya M
1. @Ray, Thank you - For your time and concern. Rgds, D Dattatreya Mellacheruvu Graduate Student, Bioinformatics, The University of Michigan, Ann Arbor. `The Strongest Principle of growth lies in human choice` ~ George Eliot (1819-1880) On Wed, Dec 23, 2009 at 7:40 PM, Ray wrote: > On Dec 24

Re: Form field required only if other fields are filled

2009-12-23 Thread pjrhar...@gmail.com
> I can use clean() method of form to od validation, but I embedded some > complex rules in field validation and dont want to repeat the code This. Use the clean method, you'll have to add add errors to the error dict if you want them to appear by the field. Not sure I follow why you would have t

Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread OkaMthembo
Hi Eric, I am not sure that the problem you experienced is related to Windows 7 (am on XP) - but if you could use the MySQLdb module for Python 2.4, i'd suspect that you probably got the wrong module? There is one specifically for Python 2.5 on the Sourceforge download page. Also, maybe check that

Re: New to Django

2009-12-23 Thread Shawn Milochik
On Dec 23, 2009, at 7:43 PM, Dattatreya M wrote: > 1. @Shawn, Thanks for the reply. I appreciate you taking time to answer. > > 2. I am going through the Django tutI was wondering if there is something > else that would save me hours of 're-inventing' the wheel (with regards to > designing

Re: MySQLdb module for Python 2.5 on Windows XP

2009-12-23 Thread dartdog
While I get the desirability of using mysql for development,, when starting out it is way easier to use the built in sql-lite.. works great and no config hassles. I now use both but wish I had not wasted too much time on the mysql config.. Just my 2cents worth..Sorry I don't have the time to find m

Skype me if you want to help a newb.

2009-12-23 Thread Cory A. Taylor
I want to get the extreme dummies version of how to use Django. My Skype ID is "coryalantaylor" -- 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, s

Re: Skype me if you want to help a newb.

2009-12-23 Thread Shawn Milochik
I can do even better than that. Here's a great tutorial: http://docs.djangoproject.com/en/dev/intro/tutorial01/ Once you work through that (or get stuck) and have specific questions, people will be glad to help you out. Shawn -- You received this message because you are subscribed to the Goo

Re: Rails-style form value deserializer?

2009-12-23 Thread Todd Blanchard
Yeah - I'm going to shelve django and see what is up with TG2 and its Geo extensions for awhile. It has become very clear that it is "not a fit" for the kind of dynamic web application development I'm looking for. I need effective and well integrated ajax out of the box and the ability to comp

Re: Thanks for (Geo)Django

2009-12-23 Thread Gabriel Gunderson
On Wed, Dec 23, 2009 at 2:52 PM, Ariel Nunez wrote: > Thanks one more time, I hope you all enjoy a lot what's little left of > this year, and especially take enough the time away from the computers > to enjoy with your family. This is a heart felt thanks. I support this message and add my 2 cent