How can I install django-stdimage in my django project, rather than as a module (jailed shell, no path access)

StackOverflow https://stackoverflow.com/questions/2264959

Question

The question about covers it. I'm using dreamhost, and need to utilize the stdimagefield rather than image field so I can do this:

 image3 = StdImageField(upload_to='path/to/img', size=(640, 480))

If there is a better way to do this, please let me know.

Edit: Trying it like this, everything is working with the "python manage.py shell" as you can see below:

>>> from stdimage import StdImageField
>>> image = StdImageField(upload_to='path', size=(425,325))
>>> print image
<stdimage.fields.StdImageField object at 0x762db3ac5910>

When I try to use it in my model though, I get this error on every page:

Using the URLconf defined in runningshoesreview.urls, Django tried these URL patterns, in this order:

  1. ^admin/(.*)
  2. ^reviews/

The current URL, internal_error.html, didn't match any of these.

Was it helpful?

Solution

Just copy the module contents into your project, making it a package if necessary. I put "external" modules in an external package.

OTHER TIPS

Just put the django-stdimage folder into your project folder (it should already be a package).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top