开发者

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

开发者 https://www.devze.com 2022-12-20 00:25 出处:网络
The question about covers it. I\'m using dreamhost, and need to utilize the st开发者_如何学Cdimagefield rather than image field so I can do this:

The question about covers it. I'm using dreamhost, and need to utilize the st开发者_如何学Cdimagefield 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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消