Forums

file read only to vim

I need to edit a file that is located in /usr/local/lib/python2.7/dist-packages/ but can't figure out how to do it.

vim is saying the file is read only and since I can't use sudo I'm not sure how to do this. Any suggestions?

You won't be able to edit that file, but there might be another way to get the same effect. Why do you want to change it?

I'm using django registration and there is an issue with one of the urls.py files. The code in the file isn't supported by the version of django I'm using (1.6.2).

django.conf.urls.defaults import * needs to be changed to from django.conf.urls import patterns, url, include

It looks like you're using Python 2.7 in your web app -- are you using a virtualenv? We strongly recommend that for Python 2.7 with newer versions of Django than the system default, and it will mean that you can install your own version of django-registration that will have the right code. There are instructions on using Python 2.7 and Django 1.6 in a virtualenv here.

Ok, thank you very much. I'll go that route.

Great -- we're here if you have any questions.