Giter Club home page Giter Club logo

django-awesome-avatar's People

Contributors

ellmetha avatar spanasik avatar vkorchagin avatar voronind 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

Watchers

 avatar  avatar  avatar  avatar  avatar

django-awesome-avatar's Issues

Got ''dict' object has no attribute 'url'' error

Hi,I use django1.6 and modelform to change avatar,when i submit the form I got the "dict has no attribute 'url'" error and <ul class="errorlist"><li>avatar<ul class="errorlist"><li>This field cannot be blank.</li></ul></li></ul>ใ€‚

Anything error I made? Thanks.

'ImageFieldFile' object has no attribute '__getitem__'

Hi,
First of all, congratulations for this very useful application. I've installed it and it's working fine. However, when I'm now accessing the django admin backend and try to update user's information (e.g. add user to a group), I got following error:

'ImageFieldFile' object has no attribute '\__getitem\__'

Could you please help?
Thx in advance.

Detailed instalation guide

Hi, could you plese make an detailed instalation guide (something like step by step), like for beginers? (I'm stuck at point 4)...

AvatarWidget Does Not Perform Well When File Not Selected

I happened upon a couple of issues in "awesome_avatar/widgets.py". I setup a form for one to update his/her profile with a new avatar. If one does not select a file, and the submits the form, an error occurs trying to convert a string to a float in the value_from_datadict method. The "data.get(name + '-ratio', 1)" returns an empty string instead of 1 because the dict value for name + '-ration' is a unicode empty string.

Also, if that error is fixed, and you use crispy forms to display your forms, the render method in "awesome_avatar/widgets.py" also has issues as it expects value to be a django.db.models.fields.files.ImageFieldFile, and instead the type is a dict, so accessing the url member of the dict results in an error.

I have fixes for these issues, if you are interested.

render() got an unexpected keyword argument 'renderer'

I'm getting the following error:

render() got an unexpected keyword argument 'renderer'

Solution:
awesome_avatar/widgets.py:36
change

def render(self, name, value, attrs=None):

to

def render(self, name, value, attrs=None, renderer=None):

Incorrect image ratios in Webkit

Using .width() and .height() in Webkit browsers returns sizing based on visual dimensions, not actual dimensions. This is a problem when trying to crop very large images. The HTML5 properties 'naturalHeight' and 'naturalWidth' can be used to determine the proper ratios.

Examples, please!

I had a problem with my upload because I forgot the enctype in my form. It is basic stuff, but can be fixed with an working example.

Missing alt attribute

When I display the avatar field in a form there is no alt attribute.

<div id="id_avatar-select-area" class="awesome-avatar-select-area" style="width:200px;height:200px">
  <img src="">
</div>

ValidationError when src attribute is empty

When I display the avatar field in a form. The page source contains src="" which is a validation error.

<div id="id_avatar-select-area" class="awesome-avatar-select-area" style="width:200px;height:200px">
  <img src="">
</div>

Uncaught TypeError: $last_img.imgAreaSelect is not a function

Uncaught TypeError: $last_img.imgAreaSelect is not a function
    at HTMLInputElement.<anonymous> (awesome-avatar.js:11)
    at HTMLInputElement.dispatch (jquery.min.js:2)
    at HTMLInputElement.v.handle (jquery.min.js:2)

upon selecting an image.

The imgAreaSelect lib is loaded.

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.