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



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.


Solution:1

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


Solution:2

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »