Re: Silly Newforms Best Practices Question

2007-05-26 Thread Kenneth Gonsalves


On 27-May-07, at 9:18 AM, SmileyChris wrote:

> That's why, like Russ, I also use a forms.py file and do the newforms
> import like:
> from django.newforms import *

i import django.newforms as nforms - so i can use both new and old

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: newforms and recaptcha => MultiWidget/MultiField?

2007-05-26 Thread SmileyChris

On May 26, 1:04 am, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> hello everyone,
>
> I'm trying to recreate reCaptcha (http://recaptcha.net/learnmore.html)
> in newforms.

I did this yesterday:
http://smileychris.tactful.co.nz/ramblings/recaptcha/


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Silly Newforms Best Practices Question

2007-05-26 Thread SmileyChris

On May 26, 2:53 pm, oggie rob <[EMAIL PROTECTED]> wrote:
> Probably not an issue, but if you import as:
> from django import newforms as forms
> you may want to watch out for namespace issues.

That's why, like Russ, I also use a forms.py file and do the newforms
import like:
from django.newforms import *

Then in my views I'll just import the form classes I create.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Feisty-updates now contains Python-2.5.1final

2007-05-26 Thread Mike Axiak

Yes, I'm sorry...let me be more clear:

Feisty Fawn currently ships with Python 2.5.1c1.
Python tried to change its API for dictionaries (which even broke
pickle [1]) -- a change with which Django is not compatible [2].
They decided to pull out this change for 2.5.1-final, and as of
yesterday (5/25) Feisty-updates has 2.5.1-final.

Anyone running 2.5.1c1 should upgrade to avoid unnecessary bugs when
using Django.

Cheers,
Mike

[1]: http://mail.python.org/pipermail/python-dev/2007-April/072573.html
[2]: http://code.djangoproject.com/ticket/3765

On May 26, 10:30 pm, Forest Bond <[EMAIL PROTECTED]> wrote:
> On Sun, May 27, 2007 at 12:36:04AM -, Mike Axiak wrote:
> > Ubuntu Feisty Fawn now has Python 2.5 [1] (thanks, Matthias Klose!).
> > For any apt-compatible system, the following should/might work:
>
> Funny enough, you should note that Feisty _ships_ with Python 2.5 
> pre-installed.
> No further action necessary, and this has been true for as long as Feisty has
> been released.  Python 2.5 is the default Python version for Feisty, and is 
> what
> you get when you type "python" at the shell.
>
> -Forest
>
>  signature.asc
> 1KDownload


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Malcolm Tredinnick

On Sat, 2007-05-26 at 19:36 -0700, David wrote:
> My apologies. I am using 0.96, not an SVN checkout of recent vintage.
> I'll check out the two tickets mentioned (starting with 3324), and
> search tickets first from now on.

You don't have to apologise for asking questions. I was hoping to  point
out a way you might be able to get faster answers.

Version number of checkout changeset number is important information,
though, with the speed of Django development these days.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread David

My apologies. I am using 0.96, not an SVN checkout of recent vintage.
I'll check out the two tickets mentioned (starting with 3324), and
search tickets first from now on.

On May 26, 9:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-05-26 at 18:02 -0700, David wrote:
> > I haven't got a lot to go on, output-wise; here's what I ran:
>
> > [EMAIL PROTECTED] intl]$ python manage.py dumpdata fuel >
> > fuel.tmp
> > Unable to serialize database: Decimal("0.00") is not JSON serializable
>
> To repeat Russell's question: which version of the code are you using?
>
> It very much sounds like you're using MySQL with a checkout prior to
> last week. In which case, you are bumping into ticket #3324. There's a
> patch there you might be able to try as a workaround if you can't
> upgrade your Django source.
>
>
>
> > And trying a different format, a different error:
>
> > [EMAIL PROTECTED] intl]$ python manage.py dumpdata --format xml
> > fuel > fuel.xml
> > Unable to serialize database: 'ascii' codec can't decode byte 0xe2 in
> > position 13: ordinal not in range(128)
>
> Since non-ASCII data essentially doesn't work on trunk, that's not too
> surprising. This is ticket #4227. As a workaround, you might be able to
> use the patch attached to that ticket, or use the unicode branch, where
> this has been fixed.
>
> One lesson from this: searching the ticket database for similar problems
> will often yield results. I have some advantage here since I work with
> our Trac enough that I have most of the major open and recently closed
> tickets in my head, but searching in the serialisation component (in
> this case) and including closed tickets as well as currently open ones
> would yield resutls.
>
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Feisty-updates now contains Python-2.5.1final

2007-05-26 Thread Jeremy Dunck

On 5/26/07, Forest Bond <[EMAIL PROTECTED]> wrote:
> Funny enough, you should note that Feisty _ships_ with Python 2.5 
> pre-installed.

Feisty shipped with a 2.5.1 release candidate which had regressions
that affected Django. A package based on 2.5.1 final was just released
this week.

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Feisty-updates now contains Python-2.5.1final

2007-05-26 Thread Forest Bond
On Sun, May 27, 2007 at 12:36:04AM -, Mike Axiak wrote:
> Ubuntu Feisty Fawn now has Python 2.5 [1] (thanks, Matthias Klose!).
> For any apt-compatible system, the following should/might work:

Funny enough, you should note that Feisty _ships_ with Python 2.5 pre-installed.
No further action necessary, and this has been true for as long as Feisty has
been released.  Python 2.5 is the default Python version for Feisty, and is what
you get when you type "python" at the shell.

-Forest


signature.asc
Description: Digital signature


Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Malcolm Tredinnick

On Sat, 2007-05-26 at 18:02 -0700, David wrote:
> I haven't got a lot to go on, output-wise; here's what I ran:
> 
> [EMAIL PROTECTED] intl]$ python manage.py dumpdata fuel >
> fuel.tmp
> Unable to serialize database: Decimal("0.00") is not JSON serializable

To repeat Russell's question: which version of the code are you using? 

It very much sounds like you're using MySQL with a checkout prior to
last week. In which case, you are bumping into ticket #3324. There's a
patch there you might be able to try as a workaround if you can't
upgrade your Django source.

> 
> And trying a different format, a different error:
> 
> [EMAIL PROTECTED] intl]$ python manage.py dumpdata --format xml
> fuel > fuel.xml
> Unable to serialize database: 'ascii' codec can't decode byte 0xe2 in
> position 13: ordinal not in range(128)

Since non-ASCII data essentially doesn't work on trunk, that's not too
surprising. This is ticket #4227. As a workaround, you might be able to
use the patch attached to that ticket, or use the unicode branch, where
this has been fixed.

One lesson from this: searching the ticket database for similar problems
will often yield results. I have some advantage here since I work with
our Trac enough that I have most of the major open and recently closed
tickets in my head, but searching in the serialisation component (in
this case) and including closed tickets as well as currently open ones
would yield resutls.

Regards,
Malcolm


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread David

I haven't got a lot to go on, output-wise; here's what I ran:

[EMAIL PROTECTED] intl]$ python manage.py dumpdata fuel >
fuel.tmp
Unable to serialize database: Decimal("0.00") is not JSON serializable

And trying a different format, a different error:

[EMAIL PROTECTED] intl]$ python manage.py dumpdata --format xml
fuel > fuel.xml
Unable to serialize database: 'ascii' codec can't decode byte 0xe2 in
position 13: ordinal not in range(128)

The fuel.tmp file contains "None\n".

The second reply asked "Why switch?" There's no smoking gun or nasty
occurrence, but we're switching some applications from Oracle to open-
source databases and are trying several. Because we need to interact
both via Django applications and via direct SQL, we have been finding
it much easier to shoot ourselves in the feet when we neglect to use
the InnoDB storage engine and thus have no foreign-key-constraint
enforcement. It also seems like Django authors (in The Book at least)
favor PostgreSQL.

On May 26, 8:40 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-05-27 at 08:14 +0800, Russell Keith-Magee wrote:
> > On 5/27/07, Hancock, David (DHANCOCK) <[EMAIL PROTECTED]> wrote:
>
> > >  I'd love it to be as simple as a dump-and-restore, but so far, no silver
> > > bullet has emerged. Things I've tried:
> > ...
> > >  manage.py dumpdata # chokes on Decimal(0.00) datatype, not sure how 
> > > to
> > > load output anyway
>
> > If this approach is failing on Decimal(0.00), I would consider it a
> > major bug. All going well, I should have a chance to look at this
> > later today.
>
> This surprises me, too. We're testing the serialisation (and reading
> back) of Decimal types in the test suite. May be some unnoticed (by me)
> difference between pure using django.core.serializers and manage.py's
> dumpdata, but the path looks pretty straightforward.
>
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Problem with string slicing in templates on non-ascii characters

2007-05-26 Thread Malcolm Tredinnick

On Sun, 2007-05-27 at 10:36 +1000, Malcolm Tredinnick wrote:
> On Sat, 2007-05-26 at 15:25 -0700, Almad wrote:
> > Hello,
> > 
> > when displaying list of my arcitles, I'm displaying first char of my
> > article as heading with {{ page.name.0 }}
> > 
> > However, for non-ascii characters, this char is crippled - see
> > http://rpgpedia.cz/nastroje/wiki/seznam-clanku/ (bottom of the page).
> 
> You are (correctly :-( ) being served the first byte from a string of
> bytes. It just happens to be half of a UTF-8 (or whetever encoding you
> are using) sequence of bytes, but Python has absolutely of knowing that.

Difficult to believe I speak English as a first language. :-(

That last sentence should end "... but Python has absolutely no way of
knowing that."

Sorry for any confusion.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Malcolm Tredinnick

On Sun, 2007-05-27 at 08:14 +0800, Russell Keith-Magee wrote:
> On 5/27/07, Hancock, David (DHANCOCK) <[EMAIL PROTECTED]> wrote:
> >
> >  I'd love it to be as simple as a dump-and-restore, but so far, no silver
> > bullet has emerged. Things I've tried:
> ...
> >  manage.py dumpdata # chokes on Decimal(0.00) datatype, not sure how to
> > load output anyway
> 
> If this approach is failing on Decimal(0.00), I would consider it a
> major bug. All going well, I should have a chance to look at this
> later today.

This surprises me, too. We're testing the serialisation (and reading
back) of Decimal types in the test suite. May be some unnoticed (by me)
difference between pure using django.core.serializers and manage.py's
dumpdata, but the path looks pretty straightforward.

Regards,
Malcolm


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Problem with string slicing in templates on non-ascii characters

2007-05-26 Thread Malcolm Tredinnick

On Sat, 2007-05-26 at 15:25 -0700, Almad wrote:
> Hello,
> 
> when displaying list of my arcitles, I'm displaying first char of my
> article as heading with {{ page.name.0 }}
> 
> However, for non-ascii characters, this char is crippled - see
> http://rpgpedia.cz/nastroje/wiki/seznam-clanku/ (bottom of the page).

You are (correctly :-( ) being served the first byte from a string of
bytes. It just happens to be half of a UTF-8 (or whetever encoding you
are using) sequence of bytes, but Python has absolutely of knowing that.

> Where should the problem be? Should this be considered as django bug?

Bytestrings are not particularly useful in cases like this, where you
want to split and join and do other string operations, so it's not
really a bug.

As Jeremy mentioned, you'll probably get more joy out of the unicode
branch, since it's much easier (and recommended) to use unicode strings
everywhere there, so you don't have to worry about encoding issues.
Slicing a unicode string as "some_unicode_string[0]" will always give
you the first character, as a unicode character -- so you don't have to
worry about how many bytes it takes up when encoded, because it's not
encoded at that point.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Feisty-updates now contains Python-2.5.1final

2007-05-26 Thread Mike Axiak

Hello,

This seems to warrant an announcement (just given the volume of IRC
problems in the recent past)...

Ubuntu Feisty Fawn now has Python 2.5 [1] (thanks, Matthias Klose!).
For any apt-compatible system, the following should/might work:

Add to your apt/sources.list (if it's not in there already):

deb http://archive.ubuntu.com/ubuntu feisty-updates main
restricted

Issue the following commands:

$ apt-get update
$ apt-get install python2.5

Cheers,
Mike

1: https://launchpad.net/ubuntu/+source/python2.5/2.5.1-0ubuntu1


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Russell Keith-Magee

On 5/27/07, Hancock, David (DHANCOCK) <[EMAIL PROTECTED]> wrote:
>
>  I'd love it to be as simple as a dump-and-restore, but so far, no silver
> bullet has emerged. Things I've tried:
...
>  manage.py dumpdata # chokes on Decimal(0.00) datatype, not sure how to
> load output anyway

If this approach is failing on Decimal(0.00), I would consider it a
major bug. All going well, I should have a chance to look at this
later today.

As a point of reference - we recently modified the Decimal/Float
representation in Django; is your code pre or post this change
([5302])?

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread blabla

hnmm i checked both names are all undercase, made sure everything is
is correct case still no change

On May 26, 7:15 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 5/26/07, blabla <[EMAIL PROTECTED]> wrote:
>
>
>
> > i went and changed the django.pth file to the folder containing mysite
> > and also tried mysite itself,
> > basically, tried both of these in django.pth
> > c:\bla, and then tried c:\bla\mysite
>
> I think it's case-sensitive.
>
> (Sorry, my Windows VM is dead right now.)


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread Jeremy Dunck

On 5/26/07, blabla <[EMAIL PROTECTED]> wrote:
>
>
> i went and changed the django.pth file to the folder containing mysite
> and also tried mysite itself,
> basically, tried both of these in django.pth
> c:\bla, and then tried c:\bla\mysite

I think it's case-sensitive.

(Sorry, my Windows VM is dead right now.)

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread blabla


i went and changed the django.pth file to the folder containing mysite
and also tried mysite itself,
basically, tried both of these in django.pth
c:\bla, and then tried c:\bla\mysite
both return the same error still
On May 26, 7:03 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 5/26/07, blabla <[EMAIL PROTECTED]> wrote:
>
> > ImportError: No module named MYSITE
>
> You need to make sure that the directory containing MYSITE is on the
> python path.
>
> There are various ways to do this, but editing django.pth is probably easiest.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Sebastjan Trepca

This might be a bit off-topic, but why are you considering migration?
Any problems or some other reasons?

Sebastjan

On 5/27/07, Jason McVetta <[EMAIL PROTECTED]> wrote:
> Check out Kettle (aka Pentaho Data Integration) from
> http://kettle.pentaho.org.  It's a heavy-weight tool, but it has a fairly
> intuitive GUI and decent documentation.  It's Open, of course, and very
> multi-platform (I personally use it on Windoze, Solaris, and occasionally
> Linux).
>
> The function you want is called "Copy Tables Wizard".  Just used that last
> week to migrate one of my Django apps from MySQL to Postgres.  It's pretty
> straightforward and hassle-free.
>
>
>
>
>
>
> On 5/26/07, Hancock, David (DHANCOCK) <[EMAIL PROTECTED]> wrote:
> >
> > We are strongly considering migrating from MySQL to PostgreSQL, but there
> seem to be enough differences between the two that I'm pulling my hair out.
> I know this is somewhat off-topic, but has anybody got some resources for
> the conversion process?
> >
> > I'd love it to be as simple as a dump-and-restore, but so far, no silver
> bullet has emerged. Things I've tried:
> >
> > mysqldump --compatible=postgresql # not so compatible
> > dump-db.py from djangosnippets.org # many data differences
> > hand-editing dumped SQL # too much work, nonexistent foreign key
> values
> > manage.py dumpdata # chokes on Decimal(0.00) datatype, not sure how to
> load output anyway
> >
> > Thanks in advance, and
> > Cheers!
> > --
> > David Hancock | [EMAIL PROTECTED]
> >
> >
> >
>
>
>  >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread Jeremy Dunck

On 5/26/07, blabla <[EMAIL PROTECTED]> wrote:
> ImportError: No module named MYSITE
>

You need to make sure that the directory containing MYSITE is on the
python path.

There are various ways to do this, but editing django.pth is probably easiest.

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Problem with string slicing in templates on non-ascii characters

2007-05-26 Thread Jeremy Dunck

On 5/26/07, Almad <[EMAIL PROTECTED]> wrote:

> However, for non-ascii characters, this char is crippled - see
> http://rpgpedia.cz/nastroje/wiki/seznam-clanku/ (bottom of the page).

You should probably use the unicode branch; Malcolm has called for
testing, and your use case is an example of where help is needed.

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread blabla

ok i had django installed  and was following the first tutorial, i ran
the django-admin.py successfully, and created the mysite directory
with the 4 files, when i open up the command prompt in mysite folder
and enter manage.py runserver i get the following error: i searched
the forums with the error and havn't found a solution that works yet

C:\BLA\MYSITE\manage.py runserver
Traceback :
  File "C:\BLA\MYSITE\manage.py", line 11, in 
execute_manager
  File "C:\Python25\Lib\site-package\django\core\manegement.py", line
1657, in
execute manager
project_directory = setup_environ
  File "C:\Python25\Lib\site-packages\django\core\management.py" line
1649, in
setup_environ
project_module = __import__
ImportError: No module named MYSITE


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Problem with string slicing in templates on non-ascii characters

2007-05-26 Thread Almad

Hello,

when displaying list of my arcitles, I'm displaying first char of my
article as heading with {{ page.name.0 }}

However, for non-ascii characters, this char is crippled - see
http://rpgpedia.cz/nastroje/wiki/seznam-clanku/ (bottom of the page).

Where should the problem be? Should this be considered as django bug?

Thank You,

Almad


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Jason McVetta
Check out Kettle (aka Pentaho Data Integration) from
http://kettle.pentaho.org.  It's a heavy-weight tool, but it has a fairly
intuitive GUI and decent documentation.  It's Open, of course, and very
multi-platform (I personally use it on Windoze, Solaris, and occasionally
Linux).

The function you want is called "Copy Tables Wizard".  Just used that last
week to migrate one of my Django apps from MySQL to Postgres.  It's pretty
straightforward and hassle-free.





On 5/26/07, Hancock, David (DHANCOCK) <[EMAIL PROTECTED]> wrote:
>
>  We are strongly considering migrating from MySQL to PostgreSQL, but there
> seem to be enough differences between the two that I'm pulling my hair out.
> I know this is somewhat off-topic, but has anybody got some resources for
> the conversion process?
>
> I'd love it to be as simple as a dump-and-restore, but so far, no silver
> bullet has emerged. Things I've tried:
>
> mysqldump --compatible=postgresql # not so compatible
> dump-db.py from djangosnippets.org # many data differences
> hand-editing dumped SQL # too much work, nonexistent foreign key
> values
> manage.py dumpdata # chokes on Decimal(0.00) datatype, not sure how to
> load output anyway
>
> Thanks in advance, and
> Cheers!
> --
> David Hancock | [EMAIL PROTECTED]
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-26 Thread Hancock, David (DHANCOCK)
We are strongly considering migrating from MySQL to PostgreSQL, but there
seem to be enough differences between the two that I'm pulling my hair out.
I know this is somewhat off-topic, but has anybody got some resources for
the conversion process?

I'd love it to be as simple as a dump-and-restore, but so far, no silver
bullet has emerged. Things I've tried:

mysqldump --compatible=postgresql # not so compatible
dump-db.py from djangosnippets.org # many data differences
hand-editing dumped SQL # too much work, nonexistent foreign key values
manage.py dumpdata # chokes on Decimal(0.00) datatype, not sure how to
load output anyway

Thanks in advance, and
Cheers!
-- 
David Hancock | [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread Jeremy Dunck

On 5/26/07, Justin Bronn <[EMAIL PROTECTED]> wrote:
...
> With respect to sqlite, I've had problems as well with the built-in
> version on Python 2.5.  I use the package from initd:
> http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/pysqlite-2.3.3.win32-py2.5.exe

Ouch.  Wrong on all counts; thanks Justin.  :)

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread Justin Bronn

>1) put c:\python25\bin on your path.

Python on Windows actually installs the executables in "C:\Python25"
-- that should be in your path instead.

> 3) Add a django.pth file to c:\python25\site-packages.  In that file,
> include the following line:
> c:\django\

Likewise, the site-packages directory is actually "C:\Python25\Lib
\site-packages."  I just copy the django subdirectory into that folder
rather than running the "setup.py" script.

With respect to sqlite, I've had problems as well with the built-in
version on Python 2.5.  I use the package from initd:
http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/pysqlite-2.3.3.win32-py2.5.exe

-Justin


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread Jeremy Dunck

On 5/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I had the same problem with vista. Basically, you need to update the
> environment variables to where you have python installed. I can only speak
> to the python being unrecognized. For some reason, it took me a while to get
> it working correctly.

You have to close the command prompt after making changes to
environment variables; they don't take effect until the next shell
startup.  Could this have been the cause of confusion?

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread blabla

hey i just found the other post
http://groups.google.com/group/django-users/browse_thread/thread/79e8716f934a3b49/c09db74b000a9052?lnk=gst&q=installing+django+windows&rnum=2#c09db74b000a9052

which showed the flaw in your guys setup.py file with the '//' i
opened up the setup.py and made the changes he suggested and django
installed, i'm going to see if i can find and updated other file he
mentions now,

On May 26, 4:35 pm, [EMAIL PROTECTED] wrote:
> I had the same problem with vista. Basically, you need to update the 
> environment variables to where you have python installed. I can only speak to 
> the python being unrecognized. For some reason, it took me a while to get it 
> working correctly. But, in the interim you should be able to use the full 
> path for python and it should work. Hope that helps
>
>
>
> -- Original message --
> From: blabla <[EMAIL PROTECTED]>
>
> > Hi thanks for the responses,
> > I followed your steps, and am having some problems still,
> > python still is unrecognized command,
> > withy my directory in the command prompt at C:\django>i enter the
> > command setup.py install and recieve error
> > package init file '\django\__init__.py' not found ( or not a regular
> > file)
> > error: package directory '\django\bin' does not exist
>
> > and which case both instance exist, any thoughts on this one?- Hide quoted 
> > text -
>
> - Show quoted text -


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread jeffhg58
I had the same problem with vista. Basically, you need to update the 
environment variables to where you have python installed. I can only speak to 
the python being unrecognized. For some reason, it took me a while to get it 
working correctly. But, in the interim you should be able to use the full path 
for python and it should work. Hope that helps

-- Original message -- 
From: blabla <[EMAIL PROTECTED]> 

> 
> Hi thanks for the responses, 
> I followed your steps, and am having some problems still, 
> python still is unrecognized command, 
> withy my directory in the command prompt at C:\django>i enter the 
> command setup.py install and recieve error 
> package init file '\django\__init__.py' not found ( or not a regular 
> file) 
> error: package directory '\django\bin' does not exist 
> 
> and which case both instance exist, any thoughts on this one? 
> 
> 
> 
> > 
--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Frustration on TEMPLATE_DIRS

2007-05-26 Thread Jeremy Dunck

On 5/26/07, itsnotvalid <[EMAIL PROTECTED]> wrote:
> I can't imagine if there is a need to fix
> that path on every machine if a given project (like a blog engine) be
> distributed to different server located in different path.

I'd change the settings file in that case.  :)

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Frustration on TEMPLATE_DIRS

2007-05-26 Thread itsnotvalid

Actually in the meantime i figured out that using
os.path.abspath('templates') would do the job, elegant as it should
be. And it is platform independent.

For the P.S. bit, I got the idea from djangoproject.com's SVN where
they have templates and the rest put together in the same branch. I
thought it is natural not to assume one project be deployed in the
same path on every machine. I can't imagine if there is a need to fix
that path on every machine if a given project (like a blog engine) be
distributed to different server located in different path.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Cross-refering models across files

2007-05-26 Thread Tomas Kopecek

Tomas Kopecek napsal(a):
> Tim Chase napsal(a):
> I> does anybody knows, how to implement cross-refering models across files?
>>   # in example_app/models_a.py
>>   class A(models.Model):
>> # no ref_to_b here
>> ...
>>
>>   # in example_app/models_b.py
>>   import a
>>   class B(models.Model):
>> ref_to_a = models.OneToOneField(a.A,
>>   related_name='ref_to_b')
>>
>>   # in example_app/models.py
>>   from models_a import *
>>   from models_b import *
>>
> Is this correct method for future django releases? Documentation says on 
> one-to-one: "The semantics of one-to-one relationships will be changing 
> soon, so we don't recommend you use them." Maybe this is more question 
> for django-devel...
> 
Moreover, it is not sufficient (general enough) solution. if ref_to_b 
and ref_to_a are two independent many-to-one relations, I can't use 
one-to-one semantics.

-- 

Tomas Kopecek
e-mail: permonik at mesias.brnonet.cz
 ICQ: 114483784

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Frustration on TEMPLATE_DIRS

2007-05-26 Thread Jeremy Dunck

On 5/26/07, itsnotvalid <[EMAIL PROTECTED]> wrote:
...
> As usual, it doesn't work, and in the comments section somebody
> suggested using os.path.dirname(__file__) instead.

Hmm.  If you have other complaints about docs, please point out places
that need improvement.

> However I am using
> windows, the path returned would be of backslashes "\" instead of "/".

The default settings.py generated by startproject tries to make this clear:

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or
"C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

...
> So is it possible to patch django instead of patching every single
> project?

I'm not sure what the original rationale was for TEMPLATE_DIRS having
that usage rule, but I can say that it avoids the need to
double-escape backslashes, which might make it *more* newbie friendly.

In any case, this would be a backwards-incompatible change, and it's
not just Django that would need to be patched in order to make it.

Consider raising this issue on django-developers if you'd like to
persue the discussion of the setting change-- this list is mostly used
for helping users rather than changing Django.

> P.S. It is freaky to hear that django intend to read files from
> absolute paths instead of using relative paths.

I'm not sure why that is.   Templates are often developed and deployed
separately than the rest of Django code.

Cheers,
  Jeremy

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



SEO Pakistan!

2007-05-26 Thread koom2019

Get Guaranteed TOP-10 Ranking in GOOGLE now 1st-Time in PAKISTAN!

For Order Now Pls Call/SMS at
0333-2303103
0345-3034510

For Order by E-mail pls Contact us at
[EMAIL PROTECTED]

TOP-10 Ranking Proved!
SEO Pakistan:   In Google TOP 10:
SEO Specialist Pakistan:In Google TOP 10:
Top 10 Ranking Pakistan:In Google TOP 10:


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Cross-refering models across files

2007-05-26 Thread Tomas Kopecek

Tim Chase napsal(a):
I> does anybody knows, how to implement cross-refering models across files?
>   # in example_app/models_a.py
>   class A(models.Model):
> # no ref_to_b here
> ...
> 
>   # in example_app/models_b.py
>   import a
>   class B(models.Model):
> ref_to_a = models.OneToOneField(a.A,
>   related_name='ref_to_b')
> 
>   # in example_app/models.py
>   from models_a import *
>   from models_b import *
> 
Is this correct method for future django releases? Documentation says on 
one-to-one: "The semantics of one-to-one relationships will be changing 
soon, so we don't recommend you use them." Maybe this is more question 
for django-devel...

-- 

Tomas Kopecek
e-mail: permonik at mesias.brnonet.cz
 ICQ: 114483784

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Cross-refering models across files

2007-05-26 Thread Tim Chase

> does anybody knows, how to implement cross-refering models across files?
> 
> Simple example:
> file 'models/a.py'
> class A(models.Model):
>  ref_to_b = models.ForeignKey('B')
>  ...
>  class Meta:
>  app_label = 'example_app'
> 
> file 'models.b.py;
> class B(models.Model):
>  ref_to_a = models.ForeignKey('A')
>  ...
>  class Meta:
>  app_label = 'example_app'

Given your example, it sounds the following might be what you
describe (though I presume your files are example_app/models_a.py
and example_app/models_b.py):

  # in example_app/models_a.py
  class A(models.Model):
# no ref_to_b here
...

  # in example_app/models_b.py
  import a
  class B(models.Model):
ref_to_a = models.OneToOneField(a.A,
  related_name='ref_to_b')

  # in example_app/models.py
  from models_a import *
  from models_b import *

-tim



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Frustration on TEMPLATE_DIRS

2007-05-26 Thread itsnotvalid

I am a new user of Django (as well as Python) that finding the tricks
on TEMPLATE_DIRS very frustrating.

Here is the method of using relative path as written in Django Book:

import os.path

TEMPLATE_DIRS = (
os.path.join(os.path.basename(__file__), 'templates'),
)

As usual, it doesn't work, and in the comments section somebody
suggested using os.path.dirname(__file__) instead. However I am using
windows, the path returned would be of backslashes "\" instead of "/".
So further suggestions include using TEMPLATE_DIRS =
( os.getcwd().replace("\\", "/") + '/templates/',) to overcome the
issue.

I am just sick of this kind of inconsistency in django over plain
python. As I notice it is okay to use Windows path in other situations
(however I don't know if those methods are crafted to live with
windows or not). Here is like the first time hearing UNIX based
software doesn't work with Windows paths. At least I heard I could use
File.expand_path to solve that out in Ruby, which turn all '\' into
'/' (as well as /yyy/../xxx => /xxx kind of paths)just by running that
command. I may have overlooked similar built-in function in python.

So is it possible to patch django instead of patching every single
project? Reading the code in django/template/loader.py doesn't help me
to solve that puzzle (strongly related to my newbie skill).

P.S. It is freaky to hear that django intend to read files from
absolute paths instead of using relative paths.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Free blog application

2007-05-26 Thread Jeremy Dunck

On 5/26/07, Jonas Melian <[EMAIL PROTECTED]> wrote:
>
> Is there any FLOSS blog system using Django?

I haven't used any of these, but check 'em out:

http://code.google.com/p/jellyroll/
http://code.google.com/p/djog/
http://code.google.com/p/sneeu/
http://code.google.com/p/geeksite/
http://code.google.com/p/blorki/
http://code.google.com/p/becca/

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Free blog application

2007-05-26 Thread Jonas Melian

Is there any FLOSS blog system using Django?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Cross-refering models across files

2007-05-26 Thread Doug B

I'd love to know this too.  I've had nothing but pain trying to
separate models, and dealing with circular import issues.  I spent a
week trying to make mine work well (any model or import changes felt a
lot like playing a round of jinga), and finally gave up and went back
to an absurdly large single file.  It's been really frustrating, but
seems more of a python limitation than anything.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Cross-refering models across files

2007-05-26 Thread Tomas Kopecek

Hello,
does anybody knows, how to implement cross-refering models across files?

Simple example:
file 'models/a.py'
class A(models.Model):
 ref_to_b = models.ForeignKey('B')
 ...
 class Meta:
 app_label = 'example_app'

file 'models.b.py;
class B(models.Model):
 ref_to_a = models.ForeignKey('A')
 ...
 class Meta:
 app_label = 'example_app'

REason for doing this is that models.py is becoming a _huge_ one. But 
when i put these two files in models directory (with appropriate 
__init__.py) I get (logical) error from get_all_related_objects from 
djago.db.core.options which coredumps in point where it wants to load 
some data from (not yet defined) class B. Is there any general technique 
to workaround this behaviour, or it is completely problem of model design?

Thanks for some future response.

-- 

Tomas Kopecek
e-mail: permonik at mesias.brnonet.cz
 ICQ: 114483784

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



DOWNLOAD Natt Chanapa sex video- Thailand Super Model Actress

2007-05-26 Thread sexy

Most people know the story of Natt Chanapa aka Nong Natt aka Nett
Kesarin. She is the Thai hottie who was involved in a scandal for her
appearance in an adult movie. She is a very sexy lady, pretty and very
curvy, and had done some pictures for various Thai men's magazines in
the past. But it was the movie that made her well known. It was filmed
in Japan and was very explicit. The problem is that making adult
movies is illegal for Thai citizens, regardless of where they do it.
So when word of the film got out the police investigated. Eventually
she was charged and fined for it.

DOWNLOAD HERE AT 
http://sexypinaycelebrity.blogspot.com/2007/05/natt-chanapa-thailand-...


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread blabla

Hi thanks for the responses,
I followed your steps, and am having some problems still,
python still is unrecognized command,
withy my directory in the command prompt at C:\django>i enter the
command setup.py install and recieve error
package init file '\django\__init__.py' not found ( or not a regular
file)
error: package directory '\django\bin' does not exist

and which case both instance exist, any thoughts on this one?



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Shared Hosting

2007-05-26 Thread Tim Chase

> I think I know but must ask, do you need django installed on the web
> server to run django built web sites? I guess this is a yes

Yes.  However, "installed" is a multi-faceted term.  To make
django accessible, all you have to do is unpack (or svn
check-out) the contents of the django version you want into a
place on the server.  However, after this ever-so-complex
"installation" there's the added complexity of *configuring* the
installation so that your hosting service can find it.

> I have a shared hosting plan and do not have SU rights 

SU? "Set up"?  "Super User"?  "Shenandoah University"? :)

Several key ingredients need to be in place to configure Django:

-a web server interface:  either mod_python enabled version of
Apache, or FCGI (not old-school "CGI") with the permission to use
long-running processes

-if using FCGI, you need to make sure you have access to the
"flup" module

-you need to make sure that when you bind your settings for your
server, that the unpacked Django "installation" is in your
$PYTHONPATH (usually added in an apache/lighty config file somewhere)

Without knowing a bit more about your server configuration, and
how far your attempts have gotten, it's hard to offer much more help

> please advise

And just as a side note/meta-commentary, I really hate this
phrase.  It's joined management buzz-words/phrases like
"paradigm", "action item", "synergy", "customer-centric", or
"win-win".  In my mind, it roughly translates as "My time is much
too valuable or I simply can't figure this out, so I'm making it
your problem, consuming your [less valuable] time, and holding
you responsible for finding a solution."  I need to create a
filter in my mailer at work that simply does a carte-blanche
replacement "please advise" with the above definition. :)



-tim





--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Shared Hosting

2007-05-26 Thread Horst Gutmann

XTCHost wrote:
> I think I know but must ask, do you need django installed on the web
> server to run django built web sites? I guess this is a yes
> 
> If so
> 
> I have a shared hosting plan and do not have SU rights so can you
> please advise the best way to install django
> 
> Many thanks
> 
> Russell
> 
> 

Installed yes, but not necessarily system-wide. For example Dreamhost
has a completely .htaccess centric FastCGI setup. So you can for example
install your own Python (with whatever libraries you want) in your
home-directory and just point to it in your fcgi-file's #!.

No idea if something like this is also possible with mod_python, but I'd
guess so.

So how exactly does your server setup look like currently?

Horst

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Shared Hosting

2007-05-26 Thread XTCHost

I think I know but must ask, do you need django installed on the web
server to run django built web sites? I guess this is a yes

If so

I have a shared hosting plan and do not have SU rights so can you
please advise the best way to install django

Many thanks

Russell


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Sam Morris

On Sat, 26 May 2007 19:28:03 +1000, Malcolm Tredinnick wrote:
> On Sat, 2007-05-26 at 02:20 -0700, Grant D. Watson wrote:
>> Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>> 
>> > > In an unusually (for Ubuntu) boneheaded move, it
>> > looks
>> > > like Ubuntu doesn't leave core files for packaged programs, even
>> > > after a "ulimit -c unlimited".  Any other way to pull this off?
>> > 
>> > I wouldn't have thought it was possible to permanently disable that,
>> > so
>> > my first thought would be you haven't changed the limits for the
>> > right
>> > process.
>> 
>> Entirely possible, but I ran the "ulimit -c unlimited" in the same bash
>> session that I subsequently ran the sync in.
>> 
>> > Is Python crashing? Or the PostgreSQL server?
>> 
>> Python:
>>   ~$ python project/manage.py syncdb
>>   Segmentation fault (core dumped)
> 
> Oh, right. :-(
> 
> I think you're a little bit doomed here, if Ubuntu ships stripped
> binaries. On a Fedora system I would install the *-debuginfo at this
> point. Then you could try
> 
> gdb python
> ...
> (gdb) run manage.py syncdb
> 
> and at least you will be in gdb when it crashes and can type "bt" to see
> what's going on. Though, as I said, with stripped binaries this is going
> to tell you nuffink.

On Debian, Ubuntu & friends the package is python-dbg. After installing 
that, run 'gdb python-dbg', and then use gdb normally.

BTW, the updated python 2.5.1 package entered feisty-updates recently, so 
assuming you have a line like this in your sources.list:

  ## Major bug fix updates produced after the final release of the
  deb http://gb.archive.ubuntu.com/ubuntu feisty-updates main restricted 
universe multiverse

then a normal upgrade should pull it in. You can check which version
of the python package you have installed with a command like:

$ apt-cache policy python
python:
  Installed: 2.5.1-0ubuntu3
  Candidate: 2.5.1-0ubuntu3
  Version table:
 *** 2.5.1-0ubuntu3 0
500 http://gb.archive.ubuntu.com feisty-updates/main Packages
100 /var/lib/dpkg/status
 2.5.1~rc1-0ubuntu3 0
500 http://gb.archive.ubuntu.com feisty/main Packages

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Eugene Morozov

Hello,
Here it is: https://bugs.launchpad.net/bugs/108067

I've planned to make a public repository with fixed packages, but I'm
too busy for this.

Anyway, you can take Feisty package, replace source code with
downloaded 2.0.6 source code from psycopg site, bump version number in
debian changelog and build the new package. It's easy, I've done it in
less than 10 minutes.
Eugene

On 26 май, 16:54, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> On Sat, 2007-05-26 at 12:42 +, Eugene Morozov wrote:
> > python-psycopg2 package in Ubuntu Feisty for x86-64 is completely
> > broken. I've reported it in the Launchpad on the next day after
> > release, but maintainer is still reluctant to apply patch which should
> > fix 64 bit issues.
>
> Ha ha! Problem understood, at least then.
>
> Do you have a Launchpad bug number for this, Eugene (or, better, a URL)?
> It'd be nice to know so that we can point others to it if they hit the
> same problems.
>
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Malcolm Tredinnick

On Sat, 2007-05-26 at 12:42 +, Eugene Morozov wrote:
> python-psycopg2 package in Ubuntu Feisty for x86-64 is completely
> broken. I've reported it in the Launchpad on the next day after
> release, but maintainer is still reluctant to apply patch which should
> fix 64 bit issues.

Ha ha! Problem understood, at least then.

Do you have a Launchpad bug number for this, Eugene (or, better, a URL)?
It'd be nice to know so that we can point others to it if they hit the
same problems.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Eugene Morozov

python-psycopg2 package in Ubuntu Feisty for x86-64 is completely
broken. I've reported it in the Launchpad on the next day after
release, but maintainer is still reluctant to apply patch which should
fix 64 bit issues.

I've solved the problem by downloading upstream beta version and
compiling a custom package from it.
Eugene


On 26 май, 07:51, "Grant D. Watson" <[EMAIL PROTECTED]> wrote:
> I'm a newbie to Django.  It looks amazing, and I've
> decided to give it a whirl, but when I try a syncdb on
> my new project I get a core dump; the only things I've
> changed in settings.py are ADMINS and DATABASE_*.
> Given the context I assume it's something to do with
> the psycopg2 library and Django?
>
> I'm running Ubuntu Feisty (amd64) with repository
> versions of Python (2.5.1c1), PostgreSQL (8.2.4) and
> python-psycopg2 (2.0.1.5-6).  I'm using Django 0.96
> installed with setup.py.
>
> I suspected the sameuser identification for Postgres
> was causing problems, but I changed it to md5 with no
> luck.
>
> I wasn't able to find anything terribly helpful on the
> web or in the list archives.  Does anybody know what
> might be causing this?
>
> Grant D. Watson, <[EMAIL PROTECTED]>
>
>   
> Shape
>  Yahoo! in your own image.  Join our Network Research Panel today!  
> http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Grant D. Watson

Of course I omitted the part that might be marginally more useful:

(gdb) bt
#0  0x00418f22 in ?? ()
#1  0x00419a10 in PyObject_CallMethod ()
#2  0x2b062bf4c7e3 in microprotocol_getquoted ()
   from /usr/lib/python2.5/site-packages/psycopg2/_psycopg.so
#3  0x2b062bf4e29b in ?? ()
   from /usr/lib/python2.5/site-packages/psycopg2/_psycopg.so
#4  0x2b062bf4efa8 in ?? ()
   from /usr/lib/python2.5/site-packages/psycopg2/_psycopg.so
#5  0x2b062bf4f7ff in ?? ()
   from /usr/lib/python2.5/site-packages/psycopg2/_psycopg.so
#6  0x004885fd in PyEval_EvalFrameEx ()
#7  0x00488951 in PyEval_EvalFrameEx ()
#8  0x004895da in PyEval_EvalCodeEx ()
#9  0x004878e5 in PyEval_EvalFrameEx ()
#10 0x004895da in PyEval_EvalCodeEx ()
#11 0x004878e5 in PyEval_EvalFrameEx ()
#12 0x004895da in PyEval_EvalCodeEx ()
#13 0x004878e5 in PyEval_EvalFrameEx ()
#14 0x004895da in PyEval_EvalCodeEx ()
#15 0x00489622 in PyEval_EvalCode ()
#16 0x004aad1e in PyRun_FileExFlags ()
#17 0x004aafb0 in PyRun_SimpleFileExFlags ()
#18 0x004146b5 in Py_Main ()
#19 0x2b062a7388e4 in __libc_start_main () from /lib/libc.so.6
#20 0x00413bf9 in _start ()

Grant D. Watson, <[EMAIL PROTECTED]>


   
Take
 the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Grant D. Watson

--- Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> I think you're a little bit doomed here, if Ubuntu
> ships stripped
> binaries. On a Fedora system I would install the
> *-debuginfo at this
> point. Then you could try
> 
> gdb python
> ...
> (gdb) run manage.py syncdb
> 
> and at least you will be in gdb when it crashes and
> can type "bt" to see
> what's going on. Though, as I said, with stripped
> binaries this is going
> to tell you nuffink.

True enough.  Toward the top of a very symbol-free
call stack was:
  [Thread debugging using libthread_db enabled]
  [New Thread 47305485371120 (LWP 3023)]
Don't know whether that's a useful clue to you or not.
 I don't know enough about the implementation of
Python to know whether that'd be the interpreter or
the module.

> I'm really not sure what else to suggest here.
> 
> One last idea: since you're using Python 2.5, you
> could try using the
> sqlite3 backend (it's shipped standard with 2.5) and
> see if that gets
> you through syncdb. No changes other than one line
> settings.py will be
> needed. That might tell us what we already suspect
> (that psycopg2 is
> involved somehow).

  Of course I didn't think of that.  That works,
and sqlite will do the job quite well for just playing
around with Django.

I wish I had more info for you-- and to satisfy my
curiosity; I guess I'll learn to live with the
uncertainty.  :-P

Thanks very much for your help.

Grant D. Watson, <[EMAIL PROTECTED]>


   
Choose
 the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: installing django on vista?

2007-05-26 Thread Ben Jones

> Since you're just getting started, set DATABASE_ENGINE to sqlite;
> you'll have a bit of trouble getting psycopg or mysqldb installed, so
> you should have some fun first.  ;-)

Be careful with the sqlite that's bundled with Python though . . .

On my Win32 python install (Python 2.5.1 (r251:54863, Apr 18 2007,
08:51:08), the bundled sqlite3 version is 3.3.4

Apparently there's a  bug in that version of sqlite. See here:

http://groups.google.com/group/django-users/browse_thread/thread/c76efd41a7870ff6/dfad6c11eaf1878e?lnk=gst&q=db+api+question&rnum=1&hl=en#dfad6c11eaf1878e

http://code.djangoproject.com/ticket/2457

--
-Ben

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Malcolm Tredinnick

On Sat, 2007-05-26 at 02:20 -0700, Grant D. Watson wrote:
> Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> 
> > > In an unusually (for Ubuntu) boneheaded move, it
> > looks
> > > like Ubuntu doesn't leave core files for packaged
> > > programs, even after a "ulimit -c unlimited".  Any
> > > other way to pull this off?
> > 
> > I wouldn't have thought it was possible to
> > permanently disable that, so
> > my first thought would be you haven't changed the
> > limits for the right
> > process.
> 
> Entirely possible, but I ran the "ulimit -c unlimited"
> in the same bash session that I subsequently ran the
> sync in.
> 
> > Is Python crashing? Or the PostgreSQL
> > server?
> 
> Python:
>   ~$ python project/manage.py syncdb
>   Segmentation fault (core dumped)

Oh, right. :-(

I think you're a little bit doomed here, if Ubuntu ships stripped
binaries. On a Fedora system I would install the *-debuginfo at this
point. Then you could try

gdb python
...
(gdb) run manage.py syncdb

and at least you will be in gdb when it crashes and can type "bt" to see
what's going on. Though, as I said, with stripped binaries this is going
to tell you nuffink.

I'm really not sure what else to suggest here.

One last idea: since you're using Python 2.5, you could try using the
sqlite3 backend (it's shipped standard with 2.5) and see if that gets
you through syncdb. No changes other than one line settings.py will be
needed. That might tell us what we already suspect (that psycopg2 is
involved somehow).

Cheers,
Malcolm



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django, Postgres and Core Dumps

2007-05-26 Thread Grant D. Watson

Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:

> > In an unusually (for Ubuntu) boneheaded move, it
> looks
> > like Ubuntu doesn't leave core files for packaged
> > programs, even after a "ulimit -c unlimited".  Any
> > other way to pull this off?
> 
> I wouldn't have thought it was possible to
> permanently disable that, so
> my first thought would be you haven't changed the
> limits for the right
> process.

Entirely possible, but I ran the "ulimit -c unlimited"
in the same bash session that I subsequently ran the
sync in.

> Is Python crashing? Or the PostgreSQL
> server?

Python:
  ~$ python project/manage.py syncdb
  Segmentation fault (core dumped)

> Are you running with the dev server or with
> mod_python? The latter case
> might be harder to debug.

I wasn't running either, actually.  I was following
the introductory steps of the tutorial
,
and I didn't know that was necessary.  But now I find
that if I start the dev server in another terminal
first I get the same crash.

The "Welcome to Django" page on port 8000 seems to
work just fine, though.

Grant D. Watson, <[EMAIL PROTECTED]>


 

Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Broken pipes with HttpResponseRedirect and Firefox / Trouble in paradise

2007-05-26 Thread Steve Freitas

On Fri, 2007-05-18 at 14:27 -0700, Jon Lesser wrote:
> I tool Malcolm's advice and looked closely at the packets going back
> and forth. Upon pressing an input button nested within an anchor,
> Firefox was sending two identical requests to the server, thus causing
> my code to be executed twice. It seems that after the server responded
> to one of the requests, the socket was closed and the second request
> threw a broken pipe exception.

FWIW, I experienced this also when testing a site I was developing with
another framework, but I never looked into it enough to confirm that it
was Firefox's fault, but I did know IE didn't do it. Perhaps you could
file a bug against Firefox?

Steve


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Unicode-branch: testers wanted

2007-05-26 Thread Malcolm Tredinnick

On Fri, 2007-05-25 at 17:17 +0200, Michael Radziej wrote:
> Hi Malcolm,
> 
> A short disclaimer: I'm currently trying the unicode branch with the 
> autoescape patch and a
> couple of other patches, so my problems might really be my own problems,
> but I don't expect it.
> 
> 
> First, I found that I have a problem with commit 5255 together with the test
> client. It breaks loading the modules, probably due to recursive imports.
> 
> - management activates translation
> - this loads all apps
> - One of my apps loads the test Client (I'm use a different testing
> framework that uses the django test client)
> - test client loads contrib.session
> - the model meta class starts translation in contribute_to_class
> - this loads all apps --> doesn't work
> 
> I moved the import statement in my app into the function --> works.
> 
> I suggest to change the test client so that it imports other models
> only in a function and not at compile time. 

Fixed at the source of the problem (django.db.models.options) in [5345].
At least, I'm pretty sure that will fix it. Let me know if the problem
persists (and why, because then it's not as you describe).

> 
> -*-
> 
> Second, I have a map of view tags, verbose names for these and how to build
> the url (it was born before the regex reverser). This map uses gettext_lazy
> for the verbose names, which is used later with the % operator. This fails
> because 
> 
> In [44]: "%s" % gettext_lazy("Dienste")
> Out[44]: ''
> 
> With proper unicode objects, though, it works:
> 
> In [45]: u"%s" % ugettext_lazy("Dienste")
> Out[45]: u'Services'
> 
> (It really requires both that the pattern is unicode and that ugettext_lazy is
> used and not gettext_lazy)
> 
> I'm now working to work around this, but it's a lot of replacements from
> "gettext_lazy" --> "ugettext_lazy" and also to promote all the patterns to
> unicode. 

Fixed in [5344]. '%s' % gettext_lazy('Dienste') will do what you expect
now.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---