public inbox for [email protected]
help / color / mirror / Atom feedFixes for django 1.4
5+ messages / 2 participants
[nested] [flat]
* Fixes for django 1.4
@ 2013-03-05 14:41 Christoph Berg <[email protected]>
2013-03-05 14:42 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Berg @ 2013-03-05 14:41 UTC (permalink / raw)
To: pgsql-www
I had to do some fixes to get the site running in django 1.4 (Debian
Wheezy). Patch is attached.
Christoph
--
[email protected] | http://www.df7cb.de/
--
Sent via pgsql-www mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
Attachments:
[text/x-diff] django1.4.diff (3.2K, 2-django1.4.diff)
download | inline diff:
diff --git a/pgweb/core/feeds.py b/pgweb/core/feeds.py
index a182d13..3dbeea2 100644
--- a/pgweb/core/feeds.py
+++ b/pgweb/core/feeds.py
@@ -1,4 +1,4 @@
-from django.contrib.syndication.feeds import Feed
+from django.contrib.syndication.views import Feed
from models import Version
diff --git a/pgweb/events/feeds.py b/pgweb/events/feeds.py
index 1c6e2b8..5326bf6 100644
--- a/pgweb/events/feeds.py
+++ b/pgweb/events/feeds.py
@@ -1,4 +1,4 @@
-from django.contrib.syndication.feeds import Feed
+from django.contrib.syndication.views import Feed
from models import Event
diff --git a/pgweb/news/feeds.py b/pgweb/news/feeds.py
index a67f1a5..f9ffb36 100644
--- a/pgweb/news/feeds.py
+++ b/pgweb/news/feeds.py
@@ -1,4 +1,4 @@
-from django.contrib.syndication.feeds import Feed
+from django.contrib.syndication.views import Feed
from models import NewsArticle
diff --git a/pgweb/pwn/feeds.py b/pgweb/pwn/feeds.py
index d8e6eee..22c350b 100644
--- a/pgweb/pwn/feeds.py
+++ b/pgweb/pwn/feeds.py
@@ -1,4 +1,4 @@
-from django.contrib.syndication.feeds import Feed
+from django.contrib.syndication.views import Feed
from models import PwnPost
diff --git a/pgweb/settings.py b/pgweb/settings.py
index c4e6958..88bdee0 100644
--- a/pgweb/settings.py
+++ b/pgweb/settings.py
@@ -9,12 +9,16 @@ ADMINS = (
MANAGERS = ADMINS
-DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = '' # Or path to database file if using sqlite3.
-DATABASE_USER = '' # Not used with sqlite3.
-DATABASE_PASSWORD = '' # Not used with sqlite3.
-DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'pgweb', # Or path to database file if using sqlite3.
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@@ -52,9 +56,8 @@ SECRET_KEY = 'REALLYCHANGETHISINSETTINGS_LOCAL.PY'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.load_template_source',
- 'django.template.loaders.app_directories.load_template_source',
-# 'django.template.loaders.eggs.load_template_source',
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = [
@@ -75,7 +78,7 @@ TEMPLATE_DIRS = (
)
TEMPLATE_CONTEXT_PROCESSORS = (
- 'django.core.context_processors.auth',
+ 'django.contrib.auth.context_processors.auth',
'django.core.context_processors.media',
'util.contexts.RootLinkContextProcessor',
)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fixes for django 1.4
2013-03-05 14:41 Fixes for django 1.4 Christoph Berg <[email protected]>
@ 2013-03-05 14:42 ` Magnus Hagander <[email protected]>
2013-03-05 14:51 ` Re: Fixes for django 1.4 Christoph Berg <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Magnus Hagander @ 2013-03-05 14:42 UTC (permalink / raw)
To: Christoph Berg <[email protected]>; pgsql-www
On Tue, Mar 5, 2013 at 3:41 PM, Christoph Berg <[email protected]> wrote:
> I had to do some fixes to get the site running in django 1.4 (Debian
> Wheezy). Patch is attached.
Have you verified that it still works on 1.2, or do we need to
validate this before applying anything?
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
--
Sent via pgsql-www mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fixes for django 1.4
2013-03-05 14:41 Fixes for django 1.4 Christoph Berg <[email protected]>
2013-03-05 14:42 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
@ 2013-03-05 14:51 ` Christoph Berg <[email protected]>
2013-03-05 14:53 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Berg @ 2013-03-05 14:51 UTC (permalink / raw)
To: pgsql-www
Re: Magnus Hagander 2013-03-05 <CABUevExEV3HEPjPvVbun_rHbUkUOVg+grPpinQWPqG1qkh_1Xw@mail.gmail.com>
> On Tue, Mar 5, 2013 at 3:41 PM, Christoph Berg <[email protected]> wrote:
> > I had to do some fixes to get the site running in django 1.4 (Debian
> > Wheezy). Patch is attached.
>
> Have you verified that it still works on 1.2, or do we need to
> validate this before applying anything?
Maybe it also works with 1.2, I haven't tried it. As discussed on irc
some time ago, I [*] think these are incompatible changes. I just
wanted to post the patch here so others don't have to do the same
changes.
Christoph
[*] Actually you said these caused deprecation warnings in 1.3
--
[email protected] | http://www.df7cb.de/
--
Sent via pgsql-www mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fixes for django 1.4
2013-03-05 14:41 Fixes for django 1.4 Christoph Berg <[email protected]>
2013-03-05 14:42 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
2013-03-05 14:51 ` Re: Fixes for django 1.4 Christoph Berg <[email protected]>
@ 2013-03-05 14:53 ` Magnus Hagander <[email protected]>
2013-03-05 16:01 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Magnus Hagander @ 2013-03-05 14:53 UTC (permalink / raw)
To: Christoph Berg <[email protected]>; pgsql-www
On Tue, Mar 5, 2013 at 3:51 PM, Christoph Berg <[email protected]> wrote:
> Re: Magnus Hagander 2013-03-05 <CABUevExEV3HEPjPvVbun_rHbUkUOVg+grPpinQWPqG1qkh_1Xw@mail.gmail.com>
>> On Tue, Mar 5, 2013 at 3:41 PM, Christoph Berg <[email protected]> wrote:
>> > I had to do some fixes to get the site running in django 1.4 (Debian
>> > Wheezy). Patch is attached.
>>
>> Have you verified that it still works on 1.2, or do we need to
>> validate this before applying anything?
>
> Maybe it also works with 1.2, I haven't tried it. As discussed on irc
> some time ago, I [*] think these are incompatible changes. I just
> wanted to post the patch here so others don't have to do the same
> changes.
Ok - but testing definitely needed then :)
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
--
Sent via pgsql-www mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Fixes for django 1.4
2013-03-05 14:41 Fixes for django 1.4 Christoph Berg <[email protected]>
2013-03-05 14:42 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
2013-03-05 14:51 ` Re: Fixes for django 1.4 Christoph Berg <[email protected]>
2013-03-05 14:53 ` Re: Fixes for django 1.4 Magnus Hagander <[email protected]>
@ 2013-03-05 16:01 ` Magnus Hagander <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Magnus Hagander @ 2013-03-05 16:01 UTC (permalink / raw)
To: Christoph Berg <[email protected]>; pgsql-www
On Tue, Mar 5, 2013 at 3:53 PM, Magnus Hagander <[email protected]> wrote:
> On Tue, Mar 5, 2013 at 3:51 PM, Christoph Berg <[email protected]> wrote:
>> Re: Magnus Hagander 2013-03-05 <CABUevExEV3HEPjPvVbun_rHbUkUOVg+grPpinQWPqG1qkh_1Xw@mail.gmail.com>
>>> On Tue, Mar 5, 2013 at 3:41 PM, Christoph Berg <[email protected]> wrote:
>>> > I had to do some fixes to get the site running in django 1.4 (Debian
>>> > Wheezy). Patch is attached.
>>>
>>> Have you verified that it still works on 1.2, or do we need to
>>> validate this before applying anything?
>>
>> Maybe it also works with 1.2, I haven't tried it. As discussed on irc
>> some time ago, I [*] think these are incompatible changes. I just
>> wanted to post the patch here so others don't have to do the same
>> changes.
>
> Ok - but testing definitely needed then :)
Looking at the patch, the feeds part looks like it should be backwards
compatible.
As for the settings - you can/should just use settings_local.py to
override that one, so the patch shouldn't be necessary.
The things about template loaders and context processors definitely
need to be tested, I haven't touched that stuff before so I have no
idea how backwards compat it would be.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
--
Sent via pgsql-www mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2013-03-05 16:01 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 14:41 Fixes for django 1.4 Christoph Berg <[email protected]>
2013-03-05 14:42 ` Magnus Hagander <[email protected]>
2013-03-05 14:51 ` Christoph Berg <[email protected]>
2013-03-05 14:53 ` Magnus Hagander <[email protected]>
2013-03-05 16:01 ` Magnus Hagander <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox