Git Product home page Git Product logo

django-image-filer's Introduction

PRE-ALPHA

Requirements:
- PIL
- mptt
- sorl.thumbnail
- django 1.1
- (south) not a requirement, but handy

for cms integration:
- django-cms-2.0

Setup
- add 'image_filer' to INSTALLED_APPS
- make the directory 'image_filer' (found in image_filer/media/') available in MEDIA_ROOT
  optional: configure IMAGE_FILER_MEDIA_URL in your project's settings.py to the URL
  where image_filer-media can be found (usually MEDIA_URL+'image_filer/' which is the
  default)
- for image upload to work, create the folder "catalogue" in your MEDIA_ROOT and make
  it writable to the web server (www-data on linux/unix). Image filer will try to do this
  for you, but if the MEDIA_ROOT folder is not writable (recomended), it will fail and you
  will see "IO ERROR" in the clipboard.
  optional: configure IMAGE_FILER_UPLOAD_ROOT to define an alternative upload directory.


Custom plugins using image folders
==================================
To customize a slideshow as shown in cms_plugins.FolderSlideshowPlugin, just do
the following in your own project:

- create a file 'cms_plugins.py' in your application root (where models.py resides):

        from cms.plugin_pool import plugin_pool
        from django.utils.translation import ugettext_lazy as _
        from image_filer.cms_plugins import FolderSlideshowPlugin
        
        class CustomSlideshowPlugin(FolderSlideshowPlugin):
            name = _("Custom slideshow")
            class Meta:
                proxy = True
            render_template = "slideshow.html"
        plugin_pool.register_plugin(CustomSlideshowPlugin)

- create an appropriate 'templates/slideshow.html' relative to your application's
  root (look at 'image_filer/slideshow2.html' for guidance)

django-image-filer's People

Contributors

stefanfoulis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-image-filer's Issues

Error in image.html template

<img {% if object.float %}class="{{ object.float }}" {% endif %}alt="{% if object.alt %}{{ object.alt }}{% endif %}" src="{% thumbnail object.image image_size %}" />

but
context.update({
'picture':instance,
'link':link,
'image_size': u'%sx%s' % (width, height),
'placeholder':placeholder
})

Need a setup.py

It can be usefull to create a setup.py and init.py file in the repository, to simplify the installation by eggs.

For example, image-filler can't be added simply to Buildout for easy project installation.

Thanks

tries to load js files from jquery/jqueryui.com sites

in directory_listing.html:

<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script src="http://dev.jquery.com/view/tags/ui/latest/ui/effects.core.js"></script> <script src="http://dev.jquery.com/view/tags/ui/latest/ui/effects.highlight.js"></script>

add "focal point" option to images

allow the definition of coordinates of the the "important part" of the image. all subsequent automatic cropping will then try to keep that important part in view.

thumnail does not get updated

after selecting a new image (cms plugin) the thumbnail is not updated. use some javascript to load the newly selected one.

Wrong context variables used in templates

I just downloaded this application and tried to use it with django-cms

Somehow the images always were outputted as

In cms_plugins.py we have:

context.update({
'picture':instance,

In the image.html template we use the variable 'image_publication' wich is obviously not there..

Also in cms_plugins.py SOME classes have render_template = "cms/plugins/xxx.html" which is not existant and some classes have render_template = "image_filer/xxx.html" which works...

Could it be that this extension is totally messed up?

Cannot upload flash objects (swf files). Is this expected?

Hi. When I try to upload a flash file (myfile.swf) it attempts to upload it and then fails with an "upload failed" message in the clipboard.

Just wondering if this is expected behaviour. Ie, as the name suggests does Image_Filer only support image files? If so no problem, just curious. Thanks for the good work.

'NoneType' object has no attribute 'now'

I have the weirdest bug that I've been chasing around for a couple of days now. Image-filer works on our servers but it doesn't work for me locally while developing. Python versions match and if I enable DEBUG on the server, it keeps working there. But not here.

What happens is this: when I upload a file I get the error "'NoneType' object has no attribute 'now'" in image_filer/models/init.py, line 244. Weird, since datetime gets imported fine. When I put "from datetime import datetime" right in front of that line, it works but fails at line 270 with something along the lines of "super needs a class, not None as first parameter".

Stepping through the code with pdb I notice that while in the save function, all references to earlier defined imports and classes are None! datetime is None, Image is None, everything outside of the function itself is None!

Stepping through the whole code, I notice that in all function of all classes in that init.py file all earlier imports and definitions are None - except for AbstractFile. Stepping through unicode() there, I can still access datetime, etc.

Any idea what's happening here?

Thanks,

Jonas

allow edit/change of an image

allow uploading a new image to replace an existing.
a view that show all the occurrences where the image was used would be great.

migrations not working

Traceback (most recent call last):
[17:03] superdmp:
File "/home/daniele/example/south/migration.py", line 247, in run_migrations
[17:03] superdmp:
runfunc(klass.orm)
[17:03] superdmp:
File "/home/daniele/modules/image_filer/migrations/0002_test.py", line 11, in forwards
[17:03] superdmp:
db.rename_field('image_file_clipboarditem.bucket_id', 'image_file_clipboarditem.clipboard_id',)
[17:03] superdmp:
AttributeError: 'DatabaseOperations' object has no attribute 'rename_field'
[17:03] superdmp:
! Error found during dry run of migration! Aborting.

Image_Filer and Grappelli?

Hi,

I'm wondering if you've ever tested Image_Filer in conjunction with Grappelli? Reason I ask is that I installed Image_Filer and everything worked great. Then I installed Grappelli and noticed that a few interface things were broken. Namely the clipboard disappears so that you can't upload files any more. Ie, the markup for the clipboard is still there and it actually does work (I can see retrieving the thumbnails in firebug so they can go on teh clipboard) but you can't actually see the clipboard div anywhere on the screen.

Also the folder view looks a little wrong style wise.

Anyway if it hasn't been tested that's fine, I'm just wondering if perhaps there's something I can configure to make it work properly in conjunction with Grappelli.

Template name for plugin in cms

The template name for the plugin in django-cms admin is not valid.

The template picture.html is called instead of image.html.

So need to fix the template filename in fs, or in the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.