Permalink
Browse files

Changes needed to run without warning using django 1.5.

  • Loading branch information...
Victor Bazterra
Victor Bazterra committed Aug 19, 2013
1 parent 9bcfe09 commit fc3f018544c19b90cc63797d18970a4cc27ef2ad
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.account.views',
('^login/?$', 'loginView'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.browser.views',
('^header/?$', 'header'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.cli.views',
(r'^autocomplete/?$', 'autocomplete'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.composer.views',
('send_email','send_email'),
@@ -1,4 +1,4 @@
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.dashboard.views',
('^save/(?P<name>[^/]+)', 'save'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.events.views',
('^get_data?$', 'get_data'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.graphlot.views',
('^rawdata/?$', 'get_data'),
@@ -7,5 +7,7 @@
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)
import os
if __name__ == "__main__":
execute_manager(settings)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
execute_from_command_line()
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.metrics.views',
('^index\.json$', 'index_json'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.render.views',
('local/?$','renderLocalView'),
View
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
from django.conf import settings
from django.contrib import admin
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.version.views',
('', 'index'),
@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""
from django.conf.urls.defaults import *
from django.conf.urls import *
urlpatterns = patterns('graphite.whitelist.views',
('add','add'),

10 comments on commit fc3f018

@faulkner

This comment has been minimized.

Show comment
Hide comment
@faulkner

faulkner Aug 22, 2013

Contributor

This breaks compatibility with Django<=1.4. If that was the intent then requirements.txt should be updated.

Contributor

faulkner replied Aug 22, 2013

This breaks compatibility with Django<=1.4. If that was the intent then requirements.txt should be updated.

@mleinart

This comment has been minimized.

Show comment
Hide comment
@mleinart

mleinart Aug 22, 2013

Member

Yup, 6516bfb did just that a commit later

Member

mleinart replied Aug 22, 2013

Yup, 6516bfb did just that a commit later

@mohabusama

This comment has been minimized.

Show comment
Hide comment
@mohabusama

mohabusama Nov 28, 2013

This fix is essential for running with Django 1.6.
Is there an estimated release date with Django 1.6 support?

Thanks!

mohabusama replied Nov 28, 2013

This fix is essential for running with Django 1.6.
Is there an estimated release date with Django 1.6 support?

Thanks!

@vhermecz

This comment has been minimized.

Show comment
Hide comment
@vhermecz

vhermecz Dec 8, 2013

Would be great either fixing requirements.txt to contain Django>=1.4,<1.6 or just releasing this update as a new version...

vhermecz replied Dec 8, 2013

Would be great either fixing requirements.txt to contain Django>=1.4,<1.6 or just releasing this update as a new version...

@arioch

This comment has been minimized.

Show comment
Hide comment
@arioch

arioch replied Dec 4, 2014

+1

@km-cc

This comment has been minimized.

Show comment
Hide comment
@km-cc

km-cc Jun 19, 2015

When I tried to sync db:
export PYTHONPATH=/opt/graphite/graphite-web-master/webapp/; /opt/graphite/bin/python /opt/graphite/bin/django-admin.py syncdb --noinput --settings=graphite.settings
I'm still receiving:
ImportError: No module named fields

Packages:
Django (1.5.12)
django-tagging (0.4)
graphite-web (0.10.0a0)
gunicorn (19.3.0)
carbon (0.9.10)
whisper (0.9.10)

graphite-web, carbon, whisher are from master branch.

km-cc replied Jun 19, 2015

When I tried to sync db:
export PYTHONPATH=/opt/graphite/graphite-web-master/webapp/; /opt/graphite/bin/python /opt/graphite/bin/django-admin.py syncdb --noinput --settings=graphite.settings
I'm still receiving:
ImportError: No module named fields

Packages:
Django (1.5.12)
django-tagging (0.4)
graphite-web (0.10.0a0)
gunicorn (19.3.0)
carbon (0.9.10)
whisper (0.9.10)

graphite-web, carbon, whisher are from master branch.

@brutasse

This comment has been minimized.

Show comment
Hide comment
@brutasse

brutasse Jun 19, 2015

Member

Can you run the same command with the --traceback flag? It should give a more detailed error.

Member

brutasse replied Jun 19, 2015

Can you run the same command with the --traceback flag? It should give a more detailed error.

@brutasse

This comment has been minimized.

Show comment
Hide comment
@brutasse

brutasse Jun 19, 2015

Member

Ah I just saw the error in some Travis logs. The error is because of the django-tagging version. Could you try an earlier version? 0.3.6, 0.3.4, 0.3.3, 0.3.2, 0.3.1

Member

brutasse replied Jun 19, 2015

Ah I just saw the error in some Travis logs. The error is because of the django-tagging version. Could you try an earlier version? 0.3.6, 0.3.4, 0.3.3, 0.3.2, 0.3.1

@km-cc

This comment has been minimized.

Show comment
Hide comment
@km-cc

km-cc Jun 19, 2015

I've tried 0.3.6 and 0.3.4, that works.
But get different error from carbon:
Traceback (most recent call last):
File "/opt/graphite/bin/carbon-cache.py", line 28, in
from carbon.util import run_twistd_plugin
ImportError: No module named carbon.util

km-cc replied Jun 19, 2015

I've tried 0.3.6 and 0.3.4, that works.
But get different error from carbon:
Traceback (most recent call last):
File "/opt/graphite/bin/carbon-cache.py", line 28, in
from carbon.util import run_twistd_plugin
ImportError: No module named carbon.util

@km-cc

This comment has been minimized.

Show comment
Hide comment
@km-cc

km-cc Jun 26, 2015

I've tried version 0.9.10, but when I go to page
ip.of.server/account/login I'm receiving error:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 89, in get_response
request.path_info)
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 236, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 234, in resolve
for pattern in self.url_patterns:
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 263, in _get_url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 258, in _get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/pymodules/python2.6/django/utils/importlib.py", line 35, in import_module
import(name)
File "/opt/graphite/webapp/graphite/account/urls.py", line 20, in
urlpatterns = patterns('graphite.account.views',
NameError: name 'patterns' is not defined

python-django 1.2.3-3+squeeze10
python-django-tagging 0.3.1-1
python-gunicorn 0.14.6
from Debian repos

km-cc replied Jun 26, 2015

I've tried version 0.9.10, but when I go to page
ip.of.server/account/login I'm receiving error:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 89, in get_response
request.path_info)
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 236, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 234, in resolve
for pattern in self.url_patterns:
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 263, in _get_url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 258, in _get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/pymodules/python2.6/django/utils/importlib.py", line 35, in import_module
import(name)
File "/opt/graphite/webapp/graphite/account/urls.py", line 20, in
urlpatterns = patterns('graphite.account.views',
NameError: name 'patterns' is not defined

python-django 1.2.3-3+squeeze10
python-django-tagging 0.3.1-1
python-gunicorn 0.14.6
from Debian repos

Please sign in to comment.