Subversion Repositories sct

Compare Revisions

Ignore whitespace Rev 645 → Rev 647

/communitytools/trunk/sphenecoll/sphene/contrib/libs/custom/custom_widgets.py
1,7 → 1,7
 
from django.newforms import *
from django.newforms.widgets import flatatt
from django.newforms.util import smart_unicode
from django.forms import *
from django.forms.widgets import flatatt
from django.forms.util import smart_unicode
from django.utils.html import escape
from django.utils.simplejson import *
/communitytools/trunk/sphenecoll/sphene/sphcomments/models.py
4,7 → 4,6
from django.db.models import signals
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.dispatch import dispatcher
 
 
from sphene.community.middleware import get_current_group
70,16 → 69,14
 
 
 
def clear_root_category_cache(instance):
def clear_root_category_cache(instance, **kwargs):
# TODO - This is a 'bit' flawed because it only works on single-process
# installations.. which is pretty unrealistic
# We should probably use django caching for this !
root_category_id = {}
 
dispatcher.connect(clear_root_category_cache,
sender = Category,
signal = signals.post_save)
dispatcher.connect(clear_root_category_cache,
sender = Category,
signal = signals.post_delete)
 
signals.post_save.connect(clear_root_category_cache,
sender = Category)
signals.post_delete.connect(clear_root_category_cache,
sender = Category)
/communitytools/trunk/sphenecoll/sphene/sphboard/views.py
1,11 → 1,10
# Create your views here.
from django import newforms as forms, template
from django import forms, template
from django.http import Http404, HttpResponseRedirect, HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.views.generic.list_detail import object_list
from django.db.models import Q
from django.template.context import RequestContext
from django.dispatch import dispatcher
from django.utils.translation import ugettext_lazy as _, ugettext_lazy
from django.utils.translation import ugettext, string_concat
from django.core.urlresolvers import reverse
/communitytools/trunk/sphenecoll/sphene/sphboard/boardforms.py
1,4 → 1,4
from django import newforms as forms
from django import forms
from django.utils.translation import ugettext_lazy as _
 
from sphene.sphboard.models import Category
/communitytools/trunk/sphenecoll/sphene/sphboard/templatetags/sphboard_extras.py
1,10 → 1,9
from django import template
from django import newforms as forms
from django import forms
from django.contrib.auth.models import User
from django.core.cache import cache
from django.db.models import signals
from django.dispatch import dispatcher
from django.newforms import widgets
from django.forms import widgets
from django.template.context import Context
from django.utils.safestring import mark_safe
 
151,22 → 150,20
for code, name in settings.LANGUAGES:
cache.delete( authorinfo_cachekey( user_id, group_id, code ) )
 
def clear_authorinfo_cache(instance):
def clear_authorinfo_cache(instance, **kwargs):
for group in Group.objects.all():
clear_cache_all_languages(instance.id, group.id)
 
def clear_authorinfo_cache_postcount(instance):
def clear_authorinfo_cache_postcount(instance, **kwargs):
clear_cache_all_languages(instance.user.id, instance.group.id)
 
dispatcher.connect(clear_authorinfo_cache,
sender = User,
signal = signals.post_save)
signals.post_save.connect(clear_authorinfo_cache,
sender = User)
 
dispatcher.connect(clear_authorinfo_cache_postcount,
sender = UserPostCount,
signal = signals.post_save)
signals.post_save.connect(clear_authorinfo_cache_postcount,
sender = UserPostCount)
 
def clear_posts_render_cache(instance):
def clear_posts_render_cache(instance, **kwargs):
for group in Group.objects.all():
allowed_categories = get_all_viewable_categories( group, instance.user )
post_list = Post.objects.filter( category__id__in = allowed_categories,
174,9 → 171,8
for post in post_list:
post.clear_render_cache()
 
dispatcher.connect(clear_posts_render_cache,
sender = CommunityUserProfile,
signal = signals.post_save)
signals.post_save.connect(clear_posts_render_cache,
sender = CommunityUserProfile)
 
 
class LatestThreadsNode(template.Node):
/communitytools/trunk/sphenecoll/sphene/sphboard/categorytyperegistry.py
60,7 → 60,7
 
def get_post_form_class(self, replypost, editpost):
"""
Should return a 'newforms' form instance - a subclass of
Should return a 'forms' form instance - a subclass of
sphene.sphboard.views.PostForm
 
Arguments:
/communitytools/trunk/sphenecoll/sphene/sphboard/management.py
1,4 → 1,3
from django.dispatch import dispatcher
from django.db.models import signals
 
from sphene.sphboard import models
43,5 → 42,5
 
 
from sphene.community.management import do_changelog
dispatcher.connect(do_changelog, sender=models, signal=signals.post_syncdb)
dispatcher.connect(init_data, sender=models, signal=signals.post_syncdb)
signals.post_syncdb.connect(do_changelog, sender=models)
signals.post_syncdb.connect(init_data, sender=models)
/communitytools/trunk/sphenecoll/sphene/sphboard/models.py
14,7 → 14,6
from django.utils.safestring import mark_safe
 
#from django.db.models import permalink
from django.dispatch import dispatcher
from django.db.models import signals
from sphene.community.sphutils import sphpermalink as permalink, get_urlconf, get_sph_setting, get_method_by_name
import sphene.community.signals
842,7 → 841,7
self.__monitor = monitor
return monitor
 
def save(self):
def save(self, force_insert=False, force_update=False):
isnew = not self.id
 
if isnew and self.is_hidden != 0:
856,7 → 855,7
# signal handler if this is really a new post (to send out email notifications
# or similar)
self.is_new_post = isnew
ret = super(Post, self).save()
ret = super(Post, self).save(force_insert=force_insert, force_update=force_update)
 
# Clear cache
cache.delete( self.__get_render_cachekey() )
986,7 → 985,7
null = True,
choices = POST_MARKUP_CHOICES, )
 
def save(self):
def save(self, force_insert=False, force_update=False):
if not self.post.is_annotated():
self.post.set_annotated(True)
self.post.save()
994,7 → 993,7
self.created = datetime.today()
if not self.id:
self.author = get_current_user()
return super(PostAnnotation, self).save()
return super(PostAnnotation, self).save(force_insert=force_insert, force_update=force_update)
 
def body_escaped(self):
body = self.body
1040,11 → 1039,11
objects = ThreadInformationManager()
 
 
def save(self):
def save(self, force_insert=False, force_update=False):
if self.thread_latest_postdate is None:
self.thread_latest_postdate = self.latest_post.postdate
super(ThreadInformation, self).save()
super(ThreadInformation, self).save(force_insert=force_insert, force_update=force_update)
 
def is_hot(self):
if self.heat_calculated and (datetime.today() - self.heat_calculated).days > 7:
1180,7 → 1179,7
 
return heat
 
def update_heat():
def update_heat(**kwargs):
"""
This method should be regularly called through a cronjob or similar -
this can be done by simply dispatching the maintenance signal.
1192,10 → 1191,9
thread.update_heat()
thread.save()
 
dispatcher.connect(update_heat,
signal = sphene.community.signals.maintenance, )
sphene.community.signals.maintenance.connect(update_heat)
 
def update_thread_information(instance):
def update_thread_information(instance, **kwargs):
"""
Updates the thread information every time a post is saved.
"""
1215,10 → 1213,10
threadinfo.save()
 
 
dispatcher.connect(update_thread_information,
sender = Post,
signal = signals.post_save)
signals.post_save.connect(update_thread_information,
sender = Post)
 
 
def ensure_thread_information():
"""
Iterates through all threads and verifies that there is a corresponding
1356,14 → 1354,14
class Meta:
unique_together = ( 'user', 'group' )
 
def update_post_count(instance):
def update_post_count(instance, **kwargs):
UserPostCount.objects.update_post_count( instance.author, instance.category.group )
 
dispatcher.connect(update_post_count,
sender = Post,
signal = signals.post_save)
 
signals.post_save.connect(update_post_count,
sender = Post)
 
 
class ExtendedCategoryConfig(models.Model):
category = models.ForeignKey( Category, unique = True )
 
1377,7 → 1375,7
 
 
 
from django import newforms as forms
from django import forms
from sphene.community.forms import EditProfileForm, Separator
from sphene.community.signals import profile_edit_init_form, profile_edit_save_form, profile_display
 
1403,13 → 1401,12
return rendered_profile
 
def clear_signature_cache(instance):
def clear_signature_cache(instance, **kwargs):
cache.delete( __get_signature_cachekey( instance.user.id ) )
 
 
dispatcher.connect(clear_signature_cache,
sender = BoardUserProfile,
signal = signals.post_save)
signals.post_save.connect(clear_signature_cache,
sender = BoardUserProfile)
 
 
def board_profile_edit_init_form(sender, instance, signal, *args, **kwargs):
1432,7 → 1429,7
required = False,
initial = profile.default_notifyme_value, )
 
def board_profile_edit_save_form(sender, instance, signal, request):
def board_profile_edit_save_form(sender, instance, signal, request, **kwargs):
user = instance.user
data = instance.cleaned_data
try:
1451,7 → 1448,7
request.user.message_set.create( message = ugettext(u"Successfully saved board profile.") )
 
 
def board_profile_display(sender, signal, request, user):
def board_profile_display(sender, signal, request, user, **kwargs):
ret = '<tr><th>%s</th><td>%d</td></tr>' % (
_('Posts'), UserPostCount.objects.get_post_count(user, get_current_group()), )
try:
1469,6 → 1466,6
return { 'additionalprofile': ret,
'block': mark_safe(blocks), }
 
dispatcher.connect(board_profile_edit_init_form, signal = profile_edit_init_form, sender = EditProfileForm)
dispatcher.connect(board_profile_edit_save_form, signal = profile_edit_save_form, sender = EditProfileForm)
dispatcher.connect(board_profile_display, signal = profile_display)
profile_edit_init_form.connect(board_profile_edit_init_form, sender = EditProfileForm)
profile_edit_save_form.connect(board_profile_edit_save_form, sender = EditProfileForm)
profile_display.connect(board_profile_display)
/communitytools/trunk/sphenecoll/sphene/sphboard/forms.py
6,7 → 6,7
in views.py
"""
 
from django import newforms as forms
from django import forms
 
from sphene.sphboard.models import Poll, PollChoice, Post
 
/communitytools/trunk/sphenecoll/sphene/sphblockframework/views.py
1,5 → 1,5
 
from django import newforms as forms
from django import forms
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.template.context import RequestContext
/communitytools/trunk/sphenecoll/sphene/community/views.py
2,7 → 2,7
 
from time import time
 
from django import newforms as forms
from django import forms
from django.conf import settings
from django.contrib.auth.models import User
from django.db.models import Q
11,7 → 11,6
from django.template.context import RequestContext
from django.template import loader, Context
from django.core.mail import send_mail, EmailMultiAlternatives
from django.dispatch import dispatcher
from django.contrib.auth import authenticate,login
from django.contrib.auth.models import User
from django.utils.safestring import mark_safe
316,9 → 315,8
has_edit_permission = True
profile_edit_url = sph_reverse( 'sphene.community.views.profile_edit', (), { 'user_id': user.id, })
 
ret = dispatcher.send(signal = profile_display,
request = request,
user = user, )
ret = profile_display.send(request = request,
user = user, )
 
additionalprofile = ''
blocks = list()
361,11 → 359,10
else:
form = EditProfileForm(user)
 
dispatcher.send(signal = profile_edit_init_form,
sender = EditProfileForm,
instance = form,
request = request,
)
profile_edit_init_form.send(sender = EditProfileForm,
instance = form,
request = request,
)
if request.method == 'POST':
if form.is_valid():
381,12 → 378,10
# Check was already made in form, we only need to change the password.
user.set_password( data['new_password'] )
 
dispatcher.send(signal = profile_edit_save_form,
sender = EditProfileForm,
instance = form,
request = request,
)
profile_edit_save_form.send(sender = EditProfileForm,
instance = form,
request = request,
)
 
user.save()
request.user.message_set.create( message = _(u'Successfully changed user profile.') )
/communitytools/trunk/sphenecoll/sphene/community/groupaware_templateloader.py
2,7 → 2,6
 
from django.conf import settings
from django.db.models import signals
from django.dispatch import dispatcher
from django.template import TemplateDoesNotExist
 
from sphene.community.models import GroupTemplate, Group
74,13 → 73,12
for child in children:
_recursive_clear_template_cache( template_name, child )
 
def clear_template_cache(instance):
def clear_template_cache(instance, **kwargs):
"""
Clears the template cache for the given instance, and all subgroups.
"""
_recursive_clear_template_cache(instance.template_name, instance.group)
 
 
dispatcher.connect(clear_template_cache,
sender = GroupTemplate,
signal = signals.post_save)
signals.post_save.connect(clear_template_cache,
sender = GroupTemplate)
/communitytools/trunk/sphenecoll/sphene/community/__init__.py
1,10 → 1,8
class PermissionDenied(Exception):
pass
 
 
from django.dispatch import dispatcher
# We can't import it as 'forms' because we've got a package called 'forms' .. how smart.
from django import newforms as djangoforms
from django import forms as djangoforms
from django.conf import settings
from sphene.community.forms import EditProfileForm, Separator
from sphene.community.signals import profile_edit_init_form, profile_edit_save_form, profile_display
69,7 → 67,7
instance.fields['community_advprofile_avatar'] = djangoforms.ImageField( label = _(u'Avatar'), required = False, )
instance.clean_community_advprofile_avatar = lambda : clean_community_advprofile_avatar(instance)
 
def community_advprofile_edit_save_form(sender, instance, signal, request):
def community_advprofile_edit_save_form(sender, instance, signal, request, **kwargs):
data = instance.cleaned_data
user = instance.user
try:
89,7 → 87,7
 
from sphene.community.templatetags import sph_extras
 
def community_advprofile_display(sender, signal, request, user):
def community_advprofile_display(sender, signal, request, user, **kwargs):
try:
profile = CommunityUserProfile.objects.get( user = user, )
except CommunityUserProfile.DoesNotExist:
117,8 → 115,8
return ret
 
dispatcher.connect(community_advprofile_edit_init_form, signal = profile_edit_init_form, sender = EditProfileForm)
dispatcher.connect(community_advprofile_edit_save_form, signal = profile_edit_save_form, sender = EditProfileForm)
dispatcher.connect(community_advprofile_display, signal = profile_display)
profile_edit_init_form.connect(community_advprofile_edit_init_form, sender = EditProfileForm)
profile_edit_save_form.connect(community_advprofile_edit_save_form, sender = EditProfileForm)
profile_display.connect(community_advprofile_display)
 
 
/communitytools/trunk/sphenecoll/sphene/community/signals.py
1,12 → 1,12
 
import django.dispatch
# Called when the edit_profile view initializes the form ...
# gives listeners a chance to add custom fields to the form.
profile_edit_init_form = object()
profile_edit_init_form = django.dispatch.Signal()
 
# Called when the edit_profile view has validated the form data and has
# saved the profile data. - Gives listeners a chance to save their form
# data previously added in profile_edit_init_form
profile_edit_save_form = object()
profile_edit_save_form = django.dispatch.Signal()
 
# called when the profile view displays the profile of a given user.
# Listeners should return HTML code which will be added into the
14,13 → 14,13
# Arguments:
# - request (Containing the http request)
# - user (The User from whom to display the profile.)
profile_display = object()
profile_display = django.dispatch.Signal()
 
 
# A signal which can be used to do periodic work,
# e.g. the board could recalculate the heat of threads.
# Should be called once a day.
maintenance = object()
maintenance = django.dispatch.Signal()
 
 
 
28,6 → 28,4
#
# echo -e "from sphene.community.signals import trigger_maintenance\ntrigger_maintenance()" | ./manage.py shell --plain
def trigger_maintenance():
from django.dispatch import dispatcher
dispatcher.send( signal = maintenance,
)
maintenance.send()
/communitytools/trunk/sphenecoll/sphene/community/templatetags/sph_extras.py
18,6 → 18,9
from django.utils.translation import ugettext as _, ugettext
from django.utils.translation import ugettext_lazy
import logging
log = logging.getLogger('sph_extras')
register = template.Library()
 
 
200,7 → 203,7
try:
profile = CommunityUserProfile.objects.get( user = value, )
except CommunityUserProfile.DoesNotExist:
return value.email
return "n/a" #value.email
return profile.public_emailaddress or value.email
 
@register.filter
331,6 → 334,7
avatar_height = None
if not profile or not profile.avatar:
avatar = get_sph_setting( 'community_avatar_default' )
log.error("got default avatar: %s", avatar)
if not avatar:
return ''
avatar_width = get_sph_setting( 'community_avatar_default_width' )
340,6 → 344,7
avatar_width = profile.avatar_width
avatar_height = profile.avatar_height
log.info("avatar: %s", avatar)
return '<img src="%s" width="%dpx" height="%dpx" alt="%s" class="sph_avatar"></img>' % (avatar, avatar_width, avatar_height, _(u'Users avatar'))
 
@register.inclusion_tag('sphene/community/templatetags/_form.html')
/communitytools/trunk/sphenecoll/sphene/community/widgets.py
1,4 → 1,4
from django import newforms as forms
from django import forms
from django.conf import settings
 
from sphene.community.sphutils import sph_reverse
/communitytools/trunk/sphenecoll/sphene/community/fields.py
1,4 → 1,4
from django import newforms as forms
from django import forms
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext_lazy as _
 
/communitytools/trunk/sphenecoll/sphene/community/sphutils.py
110,7 → 110,7
#return CaptchaRequest.validate(uid, answer) == CAPTCHA_ANSWER_OK
 
 
from django import newforms as forms
from django import forms
 
class CaptchaInputWidget(forms.widgets.TextInput):
 
/communitytools/trunk/sphenecoll/sphene/community/management.py
1,5 → 1,4
 
from django.dispatch import dispatcher
from django.db.models import signals, get_apps, get_models
from sphene.community import models
 
132,11 → 131,10
else:
print "Not updating database. You have to do this by hand !"
 
dispatcher.connect(init_data, sender=models, signal=signals.post_syncdb)
dispatcher.connect(do_changelog, signal=signals.post_syncdb)
signals.post_syncdb.connect(init_data, sender=models)
signals.post_syncdb.connect(do_changelog)
 
 
def create_permission_flags(app, created_models, verbosity):
def create_permission_flags(app, created_models, verbosity, **kwargs):
"""
Creates permission flags by looking at the Meta class of all models.
 
188,4 → 186,4
 
 
dispatcher.connect(create_permission_flags ,signal=signals.post_syncdb)
signals.post_syncdb.connect(create_permission_flags)
/communitytools/trunk/sphenecoll/sphene/community/models.py
45,8 → 45,8
)
 
class GroupMember(models.Model):
group = models.ForeignKey( Group, edit_inline = models.TABULAR, core = True )
user = models.ForeignKey( User, core = True, )
group = models.ForeignKey( Group )
user = models.ForeignKey( User, )
userlevel = models.IntegerField( choices = USERLEVEL_CHOICES )
 
 
492,8 → 492,7
### hooks
###
 
from django.dispatch import dispatcher
from django import newforms as forms
from django import forms
from sphene.community.forms import EditProfileForm, Separator
from sphene.community.signals import profile_edit_init_form, profile_edit_save_form, profile_display
 
579,7 → 578,7
request.user.message_set.create( message = _("Successfully saved community profile.") )
 
def community_profile_display(sender, signal, request, user):
def community_profile_display(sender, signal, request, user, **kwargs):
try:
profile = CommunityUserProfile.objects.get( user = user, )
except CommunityUserProfile.DoesNotExist:
599,8 → 598,8
return ret
 
dispatcher.connect(community_profile_edit_init_form, signal = profile_edit_init_form, sender = EditProfileForm)
dispatcher.connect(community_profile_edit_save_form, signal = profile_edit_save_form, sender = EditProfileForm)
dispatcher.connect(community_profile_display, signal = profile_display)
profile_edit_init_form.connect(community_profile_edit_init_form, sender = EditProfileForm)
profile_edit_save_form.connect(community_profile_edit_save_form, sender = EditProfileForm)
profile_display.connect(community_profile_display)
 
 
/communitytools/trunk/sphenecoll/sphene/community/forms.py
1,5 → 1,4
from django import newforms as forms
from django.dispatch import dispatcher
from django import forms
from django.utils.translation import ugettext_lazy as _
 
from sphene.community.signals import profile_edit_init_form
/communitytools/trunk/sphenecoll/sphene/sphlinklist/categorytype.py
1,6 → 1,6
# The categorytype which represents this linklist.
 
from django import newforms as forms
from django import forms
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
 
/communitytools/trunk/sphenecoll/sphene/__init__.py
8,7 → 8,7
from django.conf import settings
 
if hasattr(settings, 'SPH_SETTINGS') and settings.SPH_SETTINGS.get('django096compatibility', False):
from django import newforms as forms
from django import forms
 
if not hasattr(forms.Form, 'cleaned_data'):
def get_cleaned_data(self):
/communitytools/trunk/sphenecoll/sphene/sphblog/categorytypes.py
1,4 → 1,4
from django import newforms as forms
from django import forms
from django.utils.safestring import mark_safe
 
from sphene.community.models import Tag, TagLabel, TaggedItem, tag_set_labels, tag_get_labels
/communitytools/trunk/sphenecoll/sphene/sphwiki/views.py
1,11 → 1,11
from django import newforms as forms
from django.newforms import widgets
from django import forms
from django.forms import widgets
from django.shortcuts import render_to_response, get_object_or_404
from django.views.generic.list_detail import object_list
from django.template import loader
from django.template.context import RequestContext
from django import newforms as forms
from django.newforms import widgets
from django import forms
from django.forms import widgets
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.contenttypes.models import ContentType
from django.conf import settings
/communitytools/trunk/sphenecoll/sphene/sphwiki/wikilink_utils.py
3,6 → 3,8
from sphene.sphwiki.models import WikiSnip
from sphene.community.sphutils import get_sph_setting
from sphene.community.middleware import get_current_group
import logging
log = logging.getLogger('wikilink_utils')
 
# We don't want to match anything in HTML link tags.. so we exclude them completely.
WIKILINK_RE = r'''((?P<urls><a .*?>.*?</a)|(?P<escape>\\|\b)?(?P<wholeexpression>(((?P<camelcase>([A-Z]+[a-z-_0-9]+){2,})\b)|\[(?P<snipname>[A-Za-z-_/0-9]+)(\|(?P<sniplabel>.+?))?\])))'''
35,10 → 37,14
name = snipname, )
href = snip.get_absolute_url()
except WikiSnip.DoesNotExist:
snip = WikiSnip( group = get_current_group(),
name = snipname, )
 
try:
snip = WikiSnip( group = get_current_group(),
name = snipname, )
except TypeError:
log.error('No group found when getting wikilinks. Ignoring.')
return { 'label' : label}
 
if not snip.has_edit_permission() \
and get_sph_setting('wiki_links_nonexistent_show_only_privileged'):
return { 'label': label, }
/communitytools/trunk/sphenecoll/sphene/sphwiki/models.py
164,12 → 164,12
 
return False
 
def save(self):
def save(self, force_insert=False, force_update=False):
if not self.id:
self.created = datetime.today()
self.creator = self.editor
self.changed = datetime.today()
super(WikiSnip, self).save()
super(WikiSnip, self).save(force_insert=force_insert, force_update=force_update)
 
def __unicode__(self):
if not self.group: return self.name;
348,9 → 348,9
 
 
class WikiPreference(models.Model):
snip = models.ForeignKey(WikiSnip, edit_inline = models.STACKED, max_num_in_admin = 1)
view = models.IntegerField( choices = WIKI_PERMISSIONS_ALLOWED_CHOICES, core = True )
edit = models.IntegerField( choices = WIKI_PERMISSIONS_ALLOWED_CHOICES, core = True )
snip = models.ForeignKey(WikiSnip)
view = models.IntegerField( choices = WIKI_PERMISSIONS_ALLOWED_CHOICES )
edit = models.IntegerField( choices = WIKI_PERMISSIONS_ALLOWED_CHOICES )
 
 
class WikiAttachment(models.Model):
366,9 → 366,9
return ('sphene.sphwiki.views.attachmentEdit', (), { 'groupName': self.snip.group.name, 'snipName': self.snip.name, 'attachmentId': self.id } )
get_absolute_editurl = permalink(get_absolute_editurl, get_current_request)
 
def save(self):
def save(self, force_insert=False, force_update=False):
self.uploaded = datetime.today()
super(WikiAttachment, self).save()
super(WikiAttachment, self).save(force_insert=force_insert, force_update=force_update)
 
def __unicode__(self):
return self.fileupload