Commit graph

54 commits

Author SHA1 Message Date
Jannis Leidel
3fc9e7928c Allow overriding the upload and primary avatar form via a view parameter. Also don't set the default of the extra_context parameter in the function declaration. 2010-03-16 13:55:26 +01:00
Jannis Leidel
6377797e3f Don't rely on the Django app cache's get_app() since it's not guaranteed to find the app whe django-avatar is loaded. 2010-03-16 13:53:41 +01:00
Eric Florenzano
85adf39b24 More obsessive compulsiveness 2010-02-22 18:56:31 -05:00
Eric Florenzano
111ecd8543 Obsessive compulsive import cleanup 2010-02-22 18:52:37 -05:00
Eric Florenzano
b50c1b1780 Cleanup, reorganization, moved the default avatar url to conform to community standards, and added a test to ensure that it's correct. 2010-02-22 18:50:46 -05:00
Eric Florenzano
5648cb9f11 Cleanup, reorganization, moved the default avatar url to conform to community standards, and added a test to ensure that it's correct. 2010-02-22 18:48:22 -05:00
Eric Florenzano
1fb5b47ca0 Add a clarifying comment 2010-02-22 18:08:01 -05:00
Eric Florenzano
3035f0adc8 Use PyFlakes to fix some fail 2010-02-22 16:47:10 -05:00
Mathieu Pillard
984131894b Allow extra args that might be sent to the views. Useful with custom URLConf for instance. 2010-02-22 16:36:45 -05:00
Mathieu Pillard
b8341f916b fix resize for render_primary: size is a string, we need to convert it to an integer. 2010-02-22 16:36:35 -05:00
Mathieu Pillard
8cd775a41f render_primary() needs AVATAR_DEFAULT_URL 2010-02-22 16:36:23 -05:00
Eric Florenzano
2e55166df6 Fixed conflicts 2010-02-22 16:35:57 -05:00
Mathieu Pillard
e86823251b Use pretty decorators 2010-02-22 16:33:47 -05:00
Mathieu Pillard
3c3ffad9c3 Will revisit that later, it's not a big issue 2010-02-22 16:32:30 -05:00
Mathieu Pillard
0b5674f008 Simplify image handling. Breaks the new AVATAR_DONT_SAVE_DUPLICATES setting but I will revisit it later in a cleaner way 2010-02-22 16:31:14 -05:00
Mathieu Pillard
5e804236a8 new preference allowing to re-use existing file if it exists. might have concurrency issues since
we don't ask the database if it exists, only the storage system, so it might break if it's being
deleted at the same time
2010-02-22 16:29:58 -05:00
Mathieu Pillard
e96db94b02 debugging, not needed 2010-02-22 16:29:08 -05:00
Mathieu Pillard
7a6c2e04a9 This method is more closer to the original and should be more robust even if you change the max number of avatars 2010-02-22 16:28:58 -05:00
Mathieu Pillard
fe2fe0c1c3 Oops, need to actually get the first item of the queryset 2010-02-22 16:27:54 -05:00
Mathieu Pillard
b4646e5b5f More robust way of fetching the current avatar - still needs some testing 2010-02-22 16:27:21 -05:00
Mathieu Pillard
32b5d5f55f Don't use notification if the module is not present (probably broke that when refactoring notifications) 2010-02-22 16:26:04 -05:00
Mathieu Pillard
04a5a271de Use our uploadform in the templates 2010-02-22 16:24:17 -05:00
Mathieu Pillard
811e238332 Forgot this in my last commit - Refactoring : Move avatar upload to its own view, form and template part 2 2010-02-22 16:22:01 -05:00
Mathieu Pillard
a5e906e36d Starting to implement new AVATAR_MAX_AVATARS_PER_USER setting to limit the maximum number of avatars for each user 2010-02-22 16:20:46 -05:00
Mathieu Pillard
853916273f Don't use multiple querysets for the same list (might revisit the .get() for avatar later) 2010-02-22 16:19:57 -05:00
Ahmad Al-Ibrahim
df60156e30 Fixed #586 - Added login_required to avatar.views.delete 2010-02-09 09:21:19 +08:00
John Debs
ed21e5a907 Fix for error in django-avatar 1.0.3 (task #524). 2009-11-10 05:18:52 +08:00
Jakob Torp Svendsen
cc158668ea Check for django-friends using INSTALLED_APPS to prevent imports from happening
Reported to Pinax as http://code.pinaxproject.com/tasks/task/481/

Signed-off-by: Brian Rosner <brosner@gmail.com>
2009-11-07 11:15:06 -07:00
ben.browitt@gmail.com
430150e2a7 removed new_primary from views.py delete method
Signed-off-by: Eric Florenzano <floguy@gmail.com>
2009-05-25 12:59:28 +08:00
ben.browitt@gmail.com
c900d4ee98 Added notification templated. Can't verify that they are being used.
new_primay wasn't being used in delete_avatar

Signed-off-by: Eric Florenzano <floguy@gmail.com>
2009-05-25 12:59:28 +08:00
ben.browitt@gmail.com
7e6a814d7b Added avatar_updated and avatar_friend_updated
Signed-off-by: Eric Florenzano <floguy@gmail.com>
2009-05-25 12:59:27 +08:00
user
b0fa9031b4 Set a new primary avatar when deleting the primary avatar.
Signed-off-by: Eric Florenzano <floguy@gmail.com>
2009-05-25 12:58:22 +08:00
Eric Florenzano
42b0361d4b Thanks for the help, PyFlakes.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@31 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-10-28 06:43:52 +00:00
Eric Florenzano
c3fadc0377 Completely refactored this package so that it no longer references the local filesystem. The API has been simplified and it has been tested with both file system backends and S3 backends. Gearing up for the first official release.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@30 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-10-28 06:39:21 +00:00
Eric Florenzano
ba8e3268fb Made all imports relative and cleaned up the imports in general. Thanks, PyFlakes!
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@29 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-10-20 01:11:10 +00:00
Eric Florenzano
3a56d30243 Made avatar selection more clear by providing initial data for the form.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@24 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-16 05:53:55 +00:00
Eric Florenzano
d29ebe0192 Got rid of two print statements that could cause mod_wsgi to error out.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@22 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-15 21:48:04 +00:00
Eric Florenzano
237a34a59f Fixed pathing to the mkdirs call.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@21 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-12 08:30:18 +00:00
Eric Florenzano
b6bf5cf1d0 Modified the rest of the module to be able to make use of the new added flexibility of the non-gravatar interface.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@20 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-12 08:12:38 +00:00
Eric Florenzano
810ce3f8e4 Completely refactored this module. The model has been changed to reflect more sane defaults. A new set of templatetags have been created as well, however, the gravatar public API has been preserved. The only thing that still needs to be done is to rewrite the administrative views for uploading/deleting/changing avatars.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@19 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-10 22:55:25 +00:00
Eric Florenzano
a38db1b35e Added caching.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@16 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-03 23:47:00 +00:00
Eric Florenzano
97ebeaaa53 Handle the MultipleObjectsReturned edge case (shouldn't happen, but it might)
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@15 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-03 23:20:56 +00:00
Eric Florenzano
3ac9b98cb2 Try 2 on robustness adding.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@14 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-03 22:45:38 +00:00
Eric Florenzano
43f027c881 Made falling back more robust.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@13 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-03 22:37:57 +00:00
Eric Florenzano
94e33d6b70 Added exception handling for if the directory already exists.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@12 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-02 23:04:26 +00:00
Eric Florenzano
a3ec3aea8e Added some robustness to import statements.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@11 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-02 21:26:20 +00:00
Eric Florenzano
5b3da03bce Make sure to make the directories before uploading, too.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@10 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-02 11:44:59 +00:00
Eric Florenzano
b329ef276f Lazy loading doesn't seem to work correctly.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@9 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-02 05:36:33 +00:00
Eric Florenzano
3e1654d9a9 Screw it, change the wording to be easier on me and translators, yet not be any worsly-worded.
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@8 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-02 05:34:17 +00:00
Eric Florenzano
13fca802fa This isn't Perl
git-svn-id: http://django-avatar.googlecode.com/svn/trunk@7 c76b2324-5f53-0410-85ac-b1078a54aeeb
2008-08-02 05:32:46 +00:00