Re: moving to django 1.2.1

2010-08-08 Thread Michael P. Soulier
On 08/08/10 Michael P. Soulier said:

> I've picked-up Django 1.2 locally in a virtualenv for testing, and I'm
> finding suddenly that I can't login to the admin site due to a CSRF error.

Ah, found it. Somehow some firefox add-on disabled my accepting of cookies.
The error I saw didn't mention that possibility.

Mike
-- 
Michael P. Soulier 
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein


signature.asc
Description: Digital signature


Re: moving to django 1.2.1

2010-08-08 Thread Michael P. Soulier
On 31/07/10 Russell Keith-Magee said:

>  * If you have an existing project, the introduction of CSRF
> protection in Django 1.2 shouldn't pose any obstacle to upgrading.
> CSRF protection is turned on by default in new projects, but you need
> to manually turn it on for existing projects (i.e., you need to add
> the new middleware). If you don't add the new middleware, you don't
> need to do anything in order to run your project under Django 1.2. The
> only potential backwards incompatibility is if you have written custom
> templates to override the default templates provided by Django's admin
> -- but this is clearly highlighted in the release notes [2].
> 
> [2] http://docs.djangoproject.com/en/dev/releases/1.2/#csrf-protection

I've picked-up Django 1.2 locally in a virtualenv for testing, and I'm finding
suddenly that I can't login to the admin site due to a CSRF error.

I have not enabled CSRF yet, and I have not added custom admin templates.

I'm assuming that this is not expected.

Mike
-- 
Michael P. Soulier 
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein


signature.asc
Description: Digital signature


Re: moving to django 1.2.1

2010-08-04 Thread Michael P. Soulier
On 31/07/10 Russell Keith-Magee said:

> Ok - I'm repeating myself here, but we take backwards compatibility
> *very* seriously. If anyone can point at a specific backwards
> incompatible change that was introduced in Django 1.2, then that is a
> bug that we need to address, and would in all likelihood be a trigger
> for a new point release.

That is awesome, thanks. I can safely push the upgrade and I'll report any
issues found.

Mike
-- 
Michael P. Soulier 
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein


signature.asc
Description: Digital signature


Re: moving to django 1.2.1

2010-08-04 Thread dadeng
Hi,

I have tried to follow the tutorial for 1.2.1 but i'm having problems
the explanation for adding __unicode__() or __str__() to the class to
make it to list the polls correctly without any success.

addition of this code did not really fix anything in the polls
listings;

lass Poll(models.Model):
# ...
def __unicode__(self):
return self.question

class Choice(models.Model):
# ...
def __unicode__(self):
return self.choice

This is all that it has returned;

[]

What is wrong?

David


On Aug 2, 1:31 pm, tiemonster  wrote:
> Thank you so much for the valuable feedback regare ding my post. I value
> peer review, and take it very seriously. I've updated the article to
> attempt to address your concerns. Please review it at your convenience
> to ensure that your concerns are addressed appropriately.
>
> http://www.tiemonster.info/a/24005/
>
> Regards,
> Mark Cahill
>
> On Jul 31, 11:49 am, Russell Keith-Magee 
> wrote:> On Fri, Jul 30, 2010 at 8:14 PM, tiemonster  
> wrote:
> > > I cover some of the new changes in Django 1.2 in this article:
> > >http://www.tiemonster.info/a/24005/
>
> > > Most of this information comes straight from the changelist. Others
> > > were things that the core developers must have assumed were common
> > > sense, but that I didn't think about when upgrading. If you run across
> > > anything that's not on the list, let me know and I'll update the
> > > article.
>
> > Hi Mark,
>
> > Since this conversation is happening in the context of a backwards
> > compatibility discussion, I want to provide some clarification to a
> > couple of elements of your blog post:
>
> >  * Although we have introduced a new format for defining databases,
> > you aren't required to make any modifications in order to upgrade.
> > Old-style DATABASE_* settings will continue to work, as the release
> > notes describe [1].
>
> > [1]http://docs.djangoproject.com/en/dev/releases/1.2/#specifying-databases
>
> >  * The problem with database caching isn't a backwards incompatible
> > problem; it's a bug with the database cache backend when used with
> > multiple database support. Since Django 1.1 didn't have support for
> > multiple databases, it's impossible for a Django 1.1 project to
> > experience a backwards incompatibility problem here. It is, however, a
> > bug in the a Django 1.2 feature. Ticket #13946 is tracking the
> > problem; it is on my radar, and I've just updated the triage state to
> > ensure that it doesn't get forgotten.
>
> >  * If you have an existing project, the introduction of CSRF
> > protection in Django 1.2 shouldn't pose any obstacle to upgrading.
> > CSRF protection is turned on by default in new projects, but you need
> > to manually turn it on for existing projects (i.e., you need to add
> > the new middleware). If you don't add the new middleware, you don't
> > need to do anything in order to run your project under Django 1.2. The
> > only potential backwards incompatibility is if you have written custom
> > templates to override the default templates provided by Django's admin
> > -- but this is clearly highlighted in the release notes [2].
>
> > [2]http://docs.djangoproject.com/en/dev/releases/1.2/#csrf-protection
>
> >  * Your comments about messages correctly points out that the changes
> > are completely transparent, and require no immediate action for
> > compatibility.
>
> >  * I don't know where you've got your information on the changes to
> > the unit test system, but your comments are (to use a complex Latin
> > term) wrong :-) The example you point to [3] is exactly the same
> > example that existed in the docs for Django 1.1 [4] and Django 1.0
> > [5]. Django's Test Client has never had a dependency on either the
> > base unittest library or Django's own unittest extensions. Django 1.2
> > didn't introduce any significant changes to the test client. There
> > were some changes to the test runner -- the utility that sets up and
> > executes the test environment -- but again, those changes should be
> > completely transparent, and require no immediate change when
> > upgrading.
>
> > [3]http://docs.djangoproject.com/en/1.2/topics/testing/#example
> > [4]http://docs.djangoproject.com/en/1.1/topics/testing/#example
> > [5]http://docs.djangoproject.com/en/1.0/topics/testing/#example
>
> >  * Your point about admin media is generally good advice, but isn't a
> > backwards compatibility problem. Yes, Django 1.2 has new admin media
> > files, and you will need to have a complete and correct checkout of
> > those files served by your media provider (CDN or otherwise).
>
> > As I said previously, we take backwards compatibility very seriously
> > as a project. Unless you have been tinkering with internals or relying
> > on behavior that is buggy, you should be able to upgrade from Django
> > 1.1 to Django 1.2 without being required to make *any* changes to your
> > code. This 

Re: moving to django 1.2.1

2010-08-02 Thread tiemonster
Thank you so much for the valuable feedback regarding my post. I value
peer review, and take it very seriously. I've updated the article to
attempt to address your concerns. Please review it at your convenience
to ensure that your concerns are addressed appropriately.

http://www.tiemonster.info/a/24005/

Regards,
Mark Cahill




On Jul 31, 11:49 am, Russell Keith-Magee 
wrote:
> On Fri, Jul 30, 2010 at 8:14 PM, tiemonster  wrote:
> > I cover some of the new changes in Django 1.2 in this article:
> >http://www.tiemonster.info/a/24005/
>
> > Most of this information comes straight from the changelist. Others
> > were things that the core developers must have assumed were common
> > sense, but that I didn't think about when upgrading. If you run across
> > anything that's not on the list, let me know and I'll update the
> > article.
>
> Hi Mark,
>
> Since this conversation is happening in the context of a backwards
> compatibility discussion, I want to provide some clarification to a
> couple of elements of your blog post:
>
>  * Although we have introduced a new format for defining databases,
> you aren't required to make any modifications in order to upgrade.
> Old-style DATABASE_* settings will continue to work, as the release
> notes describe [1].
>
> [1]http://docs.djangoproject.com/en/dev/releases/1.2/#specifying-databases
>
>  * The problem with database caching isn't a backwards incompatible
> problem; it's a bug with the database cache backend when used with
> multiple database support. Since Django 1.1 didn't have support for
> multiple databases, it's impossible for a Django 1.1 project to
> experience a backwards incompatibility problem here. It is, however, a
> bug in the a Django 1.2 feature. Ticket #13946 is tracking the
> problem; it is on my radar, and I've just updated the triage state to
> ensure that it doesn't get forgotten.
>
>  * If you have an existing project, the introduction of CSRF
> protection in Django 1.2 shouldn't pose any obstacle to upgrading.
> CSRF protection is turned on by default in new projects, but you need
> to manually turn it on for existing projects (i.e., you need to add
> the new middleware). If you don't add the new middleware, you don't
> need to do anything in order to run your project under Django 1.2. The
> only potential backwards incompatibility is if you have written custom
> templates to override the default templates provided by Django's admin
> -- but this is clearly highlighted in the release notes [2].
>
> [2]http://docs.djangoproject.com/en/dev/releases/1.2/#csrf-protection
>
>  * Your comments about messages correctly points out that the changes
> are completely transparent, and require no immediate action for
> compatibility.
>
>  * I don't know where you've got your information on the changes to
> the unit test system, but your comments are (to use a complex Latin
> term) wrong :-) The example you point to [3] is exactly the same
> example that existed in the docs for Django 1.1 [4] and Django 1.0
> [5]. Django's Test Client has never had a dependency on either the
> base unittest library or Django's own unittest extensions. Django 1.2
> didn't introduce any significant changes to the test client. There
> were some changes to the test runner -- the utility that sets up and
> executes the test environment -- but again, those changes should be
> completely transparent, and require no immediate change when
> upgrading.
>
> [3]http://docs.djangoproject.com/en/1.2/topics/testing/#example
> [4]http://docs.djangoproject.com/en/1.1/topics/testing/#example
> [5]http://docs.djangoproject.com/en/1.0/topics/testing/#example
>
>  * Your point about admin media is generally good advice, but isn't a
> backwards compatibility problem. Yes, Django 1.2 has new admin media
> files, and you will need to have a complete and correct checkout of
> those files served by your media provider (CDN or otherwise).
>
> As I said previously, we take backwards compatibility very seriously
> as a project. Unless you have been tinkering with internals or relying
> on behavior that is buggy, you should be able to upgrade from Django
> 1.1 to Django 1.2 without being required to make *any* changes to your
> code. This has been my experience on all projects that I have updated.
> If anyone can provide a documented example to the contrary, then that
> is a bug that should be fixed, and may well be sufficient to trigger a
> point release.
>
> Note that I said *required* to make changes. There are many updates
> that are worthwhile making that aren't required (and won't be until
> Django 1.4 is released). Enabling CSRF protection is a good idea for
> security sake. Updating database settings will enable new
> architectural options. Switching to the new messaging framework allows
> for anonymous users to receive messages, and also allows for cookie
> based messaging. However, none of these modifications are required in
> order to update 

Re: moving to django 1.2.1

2010-07-31 Thread Russell Keith-Magee
On Sat, Jul 31, 2010 at 9:45 PM, Michael P. Soulier
 wrote:
> On 30/07/10 tiemonster said:
>
>> I cover some of the new changes in Django 1.2 in this article:
>> http://www.tiemonster.info/a/24005/
>>
>> Most of this information comes straight from the changelist. Others
>> were things that the core developers must have assumed were common
>> sense, but that I didn't think about when upgrading. If you run across
>> anything that's not on the list, let me know and I'll update the
>> article.
>
> That's helpful, thanks. What would be more helpful is backwards compatability
> in Django. Now I have to sell the upgrade to my peers at work, since work will
> be involved.

Ok - I'm repeating myself here, but we take backwards compatibility
*very* seriously. If anyone can point at a specific backwards
incompatible change that was introduced in Django 1.2, then that is a
bug that we need to address, and would in all likelihood be a trigger
for a new point release.

It has been my experience that you can upgrade from 1.1 to 1.2 without
any code changes. If your project was written against Django 1.0,
upgrading to 1.2 will cause some noisy warnings to be raised (about
features that have been on the deprecation path since 1.1 -- most
notably, the way of importing admin urls), but your code will still
work as is. This has also been the experience of others that I have
spoken to.

The only work is required is if you take the opportunity of the
upgrade to introduce some of the new features from Django 1.2 -- such
as CSRF protection, multiple databases, or cookie-based/anonymous
messaging. However, these are entirely optional activities. The only
change I would encourage you to make is the CSRF changes, and that's
purely for your own security. In my experience (and I've heard similar
stories from others), a reasonably large site can be migrated to use
the new CSRF protection in a matter of hours, especially if you've
been a good developer and you have lots of unit tests.

So - I would kindly ask that anyone who has what they feel is a
backwards incompatibility problem to reduce that issue to a
reproducible test case and submit a ticket. If they've already done so
and the ticket hasn't received any attention, then please speak up. To
the best of my knowledge, Django 1.2 has no backwards compatibility
issues.

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-31 Thread Russell Keith-Magee
On Fri, Jul 30, 2010 at 8:14 PM, tiemonster  wrote:
> I cover some of the new changes in Django 1.2 in this article:
> http://www.tiemonster.info/a/24005/
>
> Most of this information comes straight from the changelist. Others
> were things that the core developers must have assumed were common
> sense, but that I didn't think about when upgrading. If you run across
> anything that's not on the list, let me know and I'll update the
> article.

Hi Mark,

Since this conversation is happening in the context of a backwards
compatibility discussion, I want to provide some clarification to a
couple of elements of your blog post:

 * Although we have introduced a new format for defining databases,
you aren't required to make any modifications in order to upgrade.
Old-style DATABASE_* settings will continue to work, as the release
notes describe [1].

[1] http://docs.djangoproject.com/en/dev/releases/1.2/#specifying-databases

 * The problem with database caching isn't a backwards incompatible
problem; it's a bug with the database cache backend when used with
multiple database support. Since Django 1.1 didn't have support for
multiple databases, it's impossible for a Django 1.1 project to
experience a backwards incompatibility problem here. It is, however, a
bug in the a Django 1.2 feature. Ticket #13946 is tracking the
problem; it is on my radar, and I've just updated the triage state to
ensure that it doesn't get forgotten.

 * If you have an existing project, the introduction of CSRF
protection in Django 1.2 shouldn't pose any obstacle to upgrading.
CSRF protection is turned on by default in new projects, but you need
to manually turn it on for existing projects (i.e., you need to add
the new middleware). If you don't add the new middleware, you don't
need to do anything in order to run your project under Django 1.2. The
only potential backwards incompatibility is if you have written custom
templates to override the default templates provided by Django's admin
-- but this is clearly highlighted in the release notes [2].

[2] http://docs.djangoproject.com/en/dev/releases/1.2/#csrf-protection

 * Your comments about messages correctly points out that the changes
are completely transparent, and require no immediate action for
compatibility.

 * I don't know where you've got your information on the changes to
the unit test system, but your comments are (to use a complex Latin
term) wrong :-) The example you point to [3] is exactly the same
example that existed in the docs for Django 1.1 [4] and Django 1.0
[5]. Django's Test Client has never had a dependency on either the
base unittest library or Django's own unittest extensions. Django 1.2
didn't introduce any significant changes to the test client. There
were some changes to the test runner -- the utility that sets up and
executes the test environment -- but again, those changes should be
completely transparent, and require no immediate change when
upgrading.

[3] http://docs.djangoproject.com/en/1.2/topics/testing/#example
[4] http://docs.djangoproject.com/en/1.1/topics/testing/#example
[5] http://docs.djangoproject.com/en/1.0/topics/testing/#example

 * Your point about admin media is generally good advice, but isn't a
backwards compatibility problem. Yes, Django 1.2 has new admin media
files, and you will need to have a complete and correct checkout of
those files served by your media provider (CDN or otherwise).

As I said previously, we take backwards compatibility very seriously
as a project. Unless you have been tinkering with internals or relying
on behavior that is buggy, you should be able to upgrade from Django
1.1 to Django 1.2 without being required to make *any* changes to your
code. This has been my experience on all projects that I have updated.
If anyone can provide a documented example to the contrary, then that
is a bug that should be fixed, and may well be sufficient to trigger a
point release.

Note that I said *required* to make changes. There are many updates
that are worthwhile making that aren't required (and won't be until
Django 1.4 is released). Enabling CSRF protection is a good idea for
security sake. Updating database settings will enable new
architectural options. Switching to the new messaging framework allows
for anonymous users to receive messages, and also allows for cookie
based messaging. However, none of these modifications are required in
order to update to Django 1.2.

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-31 Thread Michael P. Soulier
On 30/07/10 tiemonster said:

> I cover some of the new changes in Django 1.2 in this article:
> http://www.tiemonster.info/a/24005/
> 
> Most of this information comes straight from the changelist. Others
> were things that the core developers must have assumed were common
> sense, but that I didn't think about when upgrading. If you run across
> anything that's not on the list, let me know and I'll update the
> article.

That's helpful, thanks. What would be more helpful is backwards compatability
in Django. Now I have to sell the upgrade to my peers at work, since work will
be involved.

Mike


signature.asc
Description: Digital signature


Re: moving to django 1.2.1

2010-07-30 Thread tiemonster
I cover some of the new changes in Django 1.2 in this article:
http://www.tiemonster.info/a/24005/

Most of this information comes straight from the changelist. Others
were things that the core developers must have assumed were common
sense, but that I didn't think about when upgrading. If you run across
anything that's not on the list, let me know and I'll update the
article.

-Mark




On Jul 29, 3:41 am, knight  wrote:
> Thank you all for the links and advises.
> It really helps me.
>
> Regards, Alex A.
>
> On Jul 29, 10:32 am, Russell Keith-Magee 
> wrote:
>
> > On Wed, Jul 28, 2010 at 9:29 PM, Massimiliano Ravelli
>
> >  wrote:
> > > On Jul 28, 3:13 pm, knight  wrote:
> > >> What are the minimal changes that I need to make in order to work with
> > >> 1.2.1?
>
> > > Did you have a look 
> > > athttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> > > ?
>
> > As it says at the top of that wiki page, that page documents the
> > backwards incompatible changes that were made in the leadup to Django
> > 1.0.
>
> > If you want migration notes for Django 1.1 or 1.2, you should consult
> > the relevant release notes:
>
> > [1]http://docs.djangoproject.com/en/dev/releases/1.1/
> > [2]http://docs.djangoproject.com/en/dev/releases/1.2/
>
> > 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-29 Thread knight
Thank you all for the links and advises.
It really helps me.

Regards, Alex A.

On Jul 29, 10:32 am, Russell Keith-Magee 
wrote:
> On Wed, Jul 28, 2010 at 9:29 PM, Massimiliano Ravelli
>
>  wrote:
> > On Jul 28, 3:13 pm, knight  wrote:
> >> What are the minimal changes that I need to make in order to work with
> >> 1.2.1?
>
> > Did you have a look 
> > athttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> > ?
>
> As it says at the top of that wiki page, that page documents the
> backwards incompatible changes that were made in the leadup to Django
> 1.0.
>
> If you want migration notes for Django 1.1 or 1.2, you should consult
> the relevant release notes:
>
> [1]http://docs.djangoproject.com/en/dev/releases/1.1/
> [2]http://docs.djangoproject.com/en/dev/releases/1.2/
>
> 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-29 Thread Russell Keith-Magee
On Wed, Jul 28, 2010 at 9:33 PM, Maksymus007  wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>  wrote:
>> On Jul 28, 3:13 pm, knight  wrote:
>>> What are the minimal changes that I need to make in order to work with
>>> 1.2.1?
>>
>> Did you have a look at 
>> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
>> ?
>
> This link in worth nothing.
> The same all the sentences link '1.1 and 1.2 are compatible'.
> They are not.
>
> I have quite big application written in 1.1 - still can't fully run it on 1.2.
> As I discovered: forms fields set to be blank=True and null=True when
> left blank on 1.1 get null value as expected, on 1.2 the get empty
> string - which crashes if database has constraints.

That's a very big claim. Simply upgrading to 1.2 shouldn't require any
changes to your source code unless you were relying upon internal APIs
or behavior that was buggy in v1.1.

We take backwards compatibility very seriously, so if you think you've
found a regression, please open a ticket describing the specific
problem. If you have already opened a ticket for this problem, then
please let me know the ticket number.

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-29 Thread Russell Keith-Magee
On Wed, Jul 28, 2010 at 9:29 PM, Massimiliano Ravelli
 wrote:
> On Jul 28, 3:13 pm, knight  wrote:
>> What are the minimal changes that I need to make in order to work with
>> 1.2.1?
>
> Did you have a look at 
> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> ?

As it says at the top of that wiki page, that page documents the
backwards incompatible changes that were made in the leadup to Django
1.0.

If you want migration notes for Django 1.1 or 1.2, you should consult
the relevant release notes:

[1] http://docs.djangoproject.com/en/dev/releases/1.1/
[2] http://docs.djangoproject.com/en/dev/releases/1.2/

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-29 Thread shofty
wasnt there some good stuff on djangoadvent?

http://djangoadvent.com/1.2/django-12-and-csrf/

Matt

On Jul 28, 2:44 pm, knight  wrote:
> Does anybody knows a good post or blog about the changes including
> csrf?
>
> On Jul 28, 4:33 pm, Maksymus007  wrote:
>
> > On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
> >  wrote:
> > > On Jul 28, 3:13 pm, knight  wrote:
> > >> What are the minimal changes that I need to make in order to work with
> > >> 1.2.1?
>
> > > Did you have a look 
> > > athttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> > > ?
>
> > This link in worth nothing.
> > The same all the sentences link '1.1 and 1.2 are compatible'.
> > They are not.
>
> > I have quite big application written in 1.1 - still can't fully run it on 
> > 1.2.
> > As I discovered: forms fields set to be blank=True and null=True when
> > left blank on 1.1 get null value as expected, on 1.2 the get empty
> > string - which crashes if database has constraints.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread dan levine
One issue that bit me that has also been mentioned here in other
threads: errors that were previously caught are now raised as errors.
So technically it was wrong previously but functionally it only breaks
on 1.2.  I haven't found a good explanation / summary of what/why/
which errors it now affects.  Mine was a circular import error that I
had to track down.  Important to note -- the error only showed up when
the app ran via wsgi or when I did an import main in the py shell, it
did not throw an error in the dev server!!  So do your upgrade testing
accordingly.

  Good luck!

D

On Jul 28, 10:03 am, Massimiliano Ravelli
 wrote:
> On 28 Lug, 15:44, knight  wrote:
>
> > Does anybody knows a good post or blog about the changes including
> > csrf?
>
> I forgot to suggest 
> readinghttp://docs.djangoproject.com/en/dev/releases/1.2/#backwards-incompat...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread Massimiliano Ravelli
On 28 Lug, 15:44, knight  wrote:
> Does anybody knows a good post or blog about the changes including
> csrf?

I forgot to suggest reading
http://docs.djangoproject.com/en/dev/releases/1.2/#backwards-incompatible-changes-in-1-2

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread Massimiliano Ravelli
On 28 Lug, 15:33, Maksymus007  wrote:
> The same all the sentences link '1.1 and 1.2 are compatible'.
> They are not.

You are right: that page doesn't mention csrf changes.
I upgraded few installations from 1.0 and from 1.1 to 1.2
and the only undocumented change I remember is exactly the csrf.
I just added {% csrf_token %} after form tag in every template.
as you can read in 
http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it

> I have quite big application written in 1.1 - still can't fully run it on 1.2.
> As I discovered: forms fields set to be blank=True and null=True when
> left blank on 1.1 get null value as expected, on 1.2 the get empty
> string - which crashes if database has constraints.

Sorry but I didn't encounter this problem.
Besides the csrf, all my upgrades went smoothly.

Regards
Massimiliano

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread knight
Does anybody knows a good post or blog about the changes including
csrf?

On Jul 28, 4:33 pm, Maksymus007  wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
>  wrote:
> > On Jul 28, 3:13 pm, knight  wrote:
> >> What are the minimal changes that I need to make in order to work with
> >> 1.2.1?
>
> > Did you have a look 
> > athttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> > ?
>
> This link in worth nothing.
> The same all the sentences link '1.1 and 1.2 are compatible'.
> They are not.
>
> I have quite big application written in 1.1 - still can't fully run it on 1.2.
> As I discovered: forms fields set to be blank=True and null=True when
> left blank on 1.1 get null value as expected, on 1.2 the get empty
> string - which crashes if database has constraints.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread knight
Is anybody knows a good post or blog about these thing including csrf
changes?

On Jul 28, 4:33 pm, Maksymus007  wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
>  wrote:
> > On Jul 28, 3:13 pm, knight  wrote:
> >> What are the minimal changes that I need to make in order to work with
> >> 1.2.1?
>
> > Did you have a look 
> > athttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> > ?
>
> This link in worth nothing.
> The same all the sentences link '1.1 and 1.2 are compatible'.
> They are not.
>
> I have quite big application written in 1.1 - still can't fully run it on 1.2.
> As I discovered: forms fields set to be blank=True and null=True when
> left blank on 1.1 get null value as expected, on 1.2 the get empty
> string - which crashes if database has constraints.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread Maksymus007
On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
 wrote:
> On Jul 28, 3:13 pm, knight  wrote:
>> What are the minimal changes that I need to make in order to work with
>> 1.2.1?
>
> Did you have a look at 
> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> ?

This link in worth nothing.
The same all the sentences link '1.1 and 1.2 are compatible'.
They are not.

I have quite big application written in 1.1 - still can't fully run it on 1.2.
As I discovered: forms fields set to be blank=True and null=True when
left blank on 1.1 get null value as expected, on 1.2 the get empty
string - which crashes if database has constraints.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: moving to django 1.2.1

2010-07-28 Thread Massimiliano Ravelli
On Jul 28, 3:13 pm, knight  wrote:
> What are the minimal changes that I need to make in order to work with
> 1.2.1?

Did you have a look at 
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



moving to django 1.2.1

2010-07-28 Thread knight
Hi,

I have pretty big django app running on django 1.0.2 and I want to
move it to django 1.2.1 since I want to use multiple databases.
What are the minimal changes that I need to make in order to work with
1.2.1?
I mean, what should I do regarding csrf and so on...
Is there a good place to read other than django documentation?

Thanks, Arshavski Alexander.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.