imsto-go client in python, include wrapper of django storage
Project description
#imsto-go client in python
## installation
`sudo pip-2.7 install -e .` (recommend)
or
`sudo python setup.py install`
## django settings
`settings.py`:
~~~
DEFAULT_FILE_STORAGE = 'imsto_client.django.ImageStorage'
IMSTO_HOST = 'localhost:8964'
IMSTO_ROOF = 'demo'
IMSTO_URL_PREFIX = '/'
IMSTO_THUMB_PATH = '/thumb'
~~~
`admins`
~~~
from django.contrib import admin
from imsto_client.django.widgets import AdminImageWidget
class GoodsAdmin(admin.ModelAdmin):
def formfield_for_dbfield(self, db_field, **kwargs):
if db_field.name == 'image_path':
request = kwargs.pop("request", None)
kwargs['widget'] = AdminImageWidget
return db_field.formfield(**kwargs)
return super(GoodsAdmin,self).formfield_for_dbfield(db_field, **kwargs)
"""more other methods""
~~~
## nginx configuration
see also: imsto-go/INSTALL.md
## installation
`sudo pip-2.7 install -e .` (recommend)
or
`sudo python setup.py install`
## django settings
`settings.py`:
~~~
DEFAULT_FILE_STORAGE = 'imsto_client.django.ImageStorage'
IMSTO_HOST = 'localhost:8964'
IMSTO_ROOF = 'demo'
IMSTO_URL_PREFIX = '/'
IMSTO_THUMB_PATH = '/thumb'
~~~
`admins`
~~~
from django.contrib import admin
from imsto_client.django.widgets import AdminImageWidget
class GoodsAdmin(admin.ModelAdmin):
def formfield_for_dbfield(self, db_field, **kwargs):
if db_field.name == 'image_path':
request = kwargs.pop("request", None)
kwargs['widget'] = AdminImageWidget
return db_field.formfield(**kwargs)
return super(GoodsAdmin,self).formfield_for_dbfield(db_field, **kwargs)
"""more other methods""
~~~
## nginx configuration
see also: imsto-go/INSTALL.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imsto_client-1.0.4.tar.gz
(5.5 kB
view details)
Built Distributions
imsto_client-1.0.4-py2.7.egg
(13.9 kB
view details)
File details
Details for the file imsto_client-1.0.4.tar.gz
.
File metadata
- Download URL: imsto_client-1.0.4.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
78a5e24aac866c04e38688e53b43fab5eab220e50a053e7cb3cd6451889b2c60
|
|
MD5 |
57b207fef9ddfbee09199e01ae6de2c3
|
|
BLAKE2b-256 |
ff818c7cf2b5e66ca06d99627b6eaa274ecee43dfc64bd7daee5ba2ec66b5d88
|
File details
Details for the file imsto_client-1.0.4.macosx-10.9-x86_64.tar.gz
.
File metadata
- Download URL: imsto_client-1.0.4.macosx-10.9-x86_64.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e5edccccd07f516888078d2dbe74f400bcf88ac52cd27e2dbef044b177541d31
|
|
MD5 |
02765d92c837c6a0658c8095339726a7
|
|
BLAKE2b-256 |
a4813b39d27ea5c4f0753a5a61ddd75e4d7a78ae0e27c55d7ee61ddd8671b08b
|
File details
Details for the file imsto_client-1.0.4-py2.7.egg
.
File metadata
- Download URL: imsto_client-1.0.4-py2.7.egg
- Upload date:
- Size: 13.9 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9144c3d188baea22c277275ee66f9a456e622a79bfa2ee7a56d9ba9dd565555a
|
|
MD5 |
31f9e7402d0566b0851726cec37d0d92
|
|
BLAKE2b-256 |
3766a8f92d8d64db2e8813593809bbeb3b0c6d3917eb53813dff042d98dfe451
|