Re: PostgreSQL Schemas.

2006-04-17 Thread Alex Li
Ed, I did a quick google and find this for SQLServer 2005. It does have some support for schema... http://msdn2.microsoft.com/en-us/library/ms186778.aspx I used SQLServer 7 long time ago and I believed it also have schema support. However, I am not sure how the schema support has changed with

Re: sinjan

2006-04-17 Thread arthur debert
just a quick extra on this one. The documentation on the admin site (link at top right, must have doc utils installed for this to work) is also available on the magic-removal branch and for newbies and people doing the transition from trunk t's pretty useful. cheers arthur --~--~-~--~-

Re: sinjan

2006-04-17 Thread Grimboy
On 17/04/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi! > I have problem with many-to-one lookup. Here is a description of my two > tables(from http://www.djangoproject.com/documentation/tutorial1/): > > > from django.core import meta > > class Poll(meta.Model): > question = meta.Cha

Accessing custom managers in O2M2O / using RelatedManager

2006-04-17 Thread D-Arb
How can i write my model so that my custom manager are accessible in a M2M2M situation: class Foo(models.Model): name = models.TextField() class Baz(models.Model): name = models.TextField() class BarManager(models.Manager): def return_something(self): return get_query_set().fi

Ordering by a column in a foreign table and custom managers

2006-04-17 Thread D-Arb
Hi there, Using django magic removal atm. I have been unable to find out any way of ordering objects by columns from foreign tables. for e.g. if i have: class Foo(models.Model): blah = models.TextField() date = models.DateTime() class Bar(models.Model): foo = models.ForeignKey(Foo)

Re: Vim users - syntax highlighting for Django templates

2006-04-17 Thread aaloy
2006/4/17, Jeroen Ruigrok van der Werven : > For those of you who use vim, please see > > http://www.vim.org/scripts/script.php?script_id=1487 > > for some lovely syntax highlighting files by Dave Hodder. > > Thanks Dave, you were faster than me. :D > Thank you for the lina and thanks a lot Dave

Re: UNICODE database API How to

2006-04-17 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: from django.models.page import pages p = pages.Page(path=u"/föö", source=u"/bär") p.save() Interesting. I get here a 'Segmentation fault'. Both in in m-r and trunk... q = pages.get_object(path__exact=u"/föö") q.path

Re: UNICODE database API How to

2006-04-17 Thread [EMAIL PROTECTED]
Ivan Sagalaev wrote: > It depends very much on the definition of "correctly". Django's ORM > expect single-byte strings which for unicode means utf-8. >>> from django.models.page import pages >>> p = pages.Page(path=u"/föö", source=u"/bär") >>> p.save() >>> q = pages.get_object(path__exact=u"/f

Re: UNICODE database API How to

2006-04-17 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: >(I haven't used mysql with Django, but I'm quite sure that the Django >ORM handles Unicode correctly). > > It depends very much on the definition of "correctly". Django's ORM expect single-byte strings which for unicode means utf-8. --~--~-~--~~--

OneToOneField and edit_inline

2006-04-17 Thread Dagur
Hi, I have a model like this (which is based on an old system I'm porting): class Member(meta.Model): user = meta.OneToOneField(auth.User, core=True) ipb_id = meta.IntegerField(default=0) website = meta.URLField(blank=True, null=True) hide_email = meta.BooleanField(default=True)

Re: UNICODE database API How to

2006-04-17 Thread Ivan Sagalaev
yml wrote: >Ivan hi, >I try your recommandation but unfortunatly it is not working I am >getting the following error message: > >In [38]: r=Department(department=matches[1].encode('utf-8'), >department_number=matches[0].encode('utf-8'), country="France") >-

Vim users - syntax highlighting for Django templates

2006-04-17 Thread Jeroen Ruigrok van der Werven
For those of you who use vim, please see http://www.vim.org/scripts/script.php?script_id=1487 for some lovely syntax highlighting files by Dave Hodder. Thanks Dave, you were faster than me. :D -- Jeroen Ruigrok van der Werven --~--~-~--~~~---~--~~ You received t

sinjan

2006-04-17 Thread sinjansibot
Hi! I have problem with many-to-one lookup. Here is a description of my two tables(from http://www.djangoproject.com/documentation/tutorial1/): from django.core import meta class Poll(meta.Model): question = meta.CharField(maxlength=200) pub_date = meta.DateTimeField('date published')

Re: UNICODE database API How to

2006-04-17 Thread [EMAIL PROTECTED]
yml wrote: > I try your recommandation but unfortunatly it is not working I am > getting the following error message: > > In [38]: r=Department(department=matches[1].encode('utf-8'), > department_number=matches[0].encode('utf-8'), country="France") > --

Re: UNICODE database API How to

2006-04-17 Thread yml
Ivan hi, I try your recommandation but unfortunatly it is not working I am getting the following error message: In [38]: r=Department(department=matches[1].encode('utf-8'), department_number=matches[0].encode('utf-8'), country="France")

Re: UNICODE database API How to

2006-04-17 Thread Ivan Sagalaev
yml wrote: > I guess that I should add something to my script called >loader_departments.py in order to support this. > > Yes. You are getting contents of your file in unicode but Django's ORM expect strings to be in byte strings. So you have to encode them into whatever encoding your DB is

Re: Using django models on external scripts.

2006-04-17 Thread Russell Keith-Magee
On 4/17/06, Julio César Carrascal Urquijo <[EMAIL PROTECTED]> wrote: > I would like to use django models on external scripts to > initialize/modify the database. Is it possible? It certainly should be possible. > I've followed the instructions of the tutorial (set > DJANGO_SETTINGS_MODULE='webs

UNICODE database API How to

2006-04-17 Thread yml
Hello Djangonauts, I am tryng to import non ascii data stored in a file to do so I am using a regular expression to parse the lines of the files in order separates the "department number" from the department names. This is working fine my problem comes when I am trying to use the Django's DB API