Sphene Community Tools


Copyright © 2007-2018 by Herbert Poul

You are not logged in.

Change Language:

AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » Feature Discussions » Updates in SCT

Page: 1 2 Next

Quick list of recent updates of SCT code I've done:

1. sphboard now uses migrations (if South is present)

2. Added some code in order to make postsyncdb signals used by SCT work while using South

3. SCT now uses slughifi to generate slugs. This means that special characters are not removed from slug, eg.:
Title: zażółć gęślą jaźń
Slug: zazolc-gesla-jazn

Previously it would be:
Slug: za-gl-ja

4. Added new management views:
'List of users' and (if sphboard is used) 'list of posts of specific user'
It is now possible to remove posts of individual user from one place. You can also remove all posts of specific user (at last it will be possible to remove all spam quickly!)

To use these new views change the code with links to other admin views to be something like:

{% if sph_perms.community_manage_roles or sph_perms.community_manage_users %}
      {% if sph_perms.community_manage_roles %}
        <li><a href="{% sph_url 'community_admin_permission_role_list' %}">{% trans "Manage Roles" %}</a></li>
        <li><a href="{% sph_url 'community_admin_permission_rolegroup_list' %}">{% trans "Manage Role Groups" %}</a></li>
       {% endif %}
       {% if sph_perms.community_manage_users %}
        <li><a href="{% sph_url 'sph_admin_users' %}">{% trans "Manage users" %}</a></li>
       {% endif %}
    {% endif %}

As you can see new permission was introduced: community_manage_users

5. Permission names and field names in management views (see point 4.) are now translated.

6. Fixed post count for users - now it is aware of is_hidden attribute of posts.
One more thing. The example buildout_project: http://sct.sphene.net/board/thread/3657/sct-example-project-in-one-minute-with/?page=1#post-3707

was also updated.
There is no feedback about this buildouted project, but maybe it should be mentioned in documentation, that it exists.
cool, thanks for the updates.. i think i should create a release soon :) ...
i'll update this forum (and thedjangoforum.com) in the next few days, if everything goes smoothly i'll create a 0.7 release.. it's time anyway :)

have you encountered any compatibility issues with django 1.2.3? i think this is the version you're using?
Hey, we have Signatures !!! Great, isn't it ? ;)
I use 1.2.3 but not yet at production site. Anyway I didn't find any issues with compatibility so far.
I think that it would be necessary to decide about dropping support for older Django releases.
For example message backend is completly rewriten in Django 1.2 and SCT still has to use user.message_set.create(...).

I wonder about adding few more features: eg. list of active monitors at user profile (with disable button) and maybe management view to add/edit/remove categories (currently it is only possible from Admin panel). Unfortunatelly I don't know if and when I'll have some time to do it.

--- Ostatnio edytowane 2010-10-28 22:53:39 przez pigletto ---
I've commited another changes:
- fixed displaying of user at 'Edit profile' page. Because 'user' variable was passed into template it messed with user from context processor
- slightly changed toggle_monitor methods to allow admin toggling monitors for users
- added list of active monitors to user profile

I've noticed one problem with Django 1.2 and sphene.
Currently Sphene doesn't use {% csrf_token %} so if someone wants to use csrf_middleware then he has to override all templates containing <form method="post" and add csrf_token.

So, what about adding {% csrf_token %} to all Sphene templates? I can do these changes, but this will break backward compatibility with Django versions lower than 1.2.
yes, definitively .. i have already added it in a few places (i think :) ) - i think it's quite fair to break with dajngo <1.2 in a new SCT release.
Hey, we have Signatures !!! Great, isn't it ? ;)

I've also slightly changed sct_pagination to allow it to pass additional query_string attibutes between pages.
This was necessary because when I added sorting to (new) list of sct users then orderby parameter was not passed to second page.
Few more changes:
1. Updated feeds for Sphboard to Django 1.2. Possible issue might be for sites that use customized feed templates for LatestThreads feed as currently no templates are used there (I wanted to use body_escaped(render_signature=False) so I've used item_title and item_description)

2. Upgraded pagination. Template tag sph_pagination now accepts additional argument: compress = 1/0. If compress is set to 1 then list of paginated pages is limited to show at most 7 pages with current page at the middle. Take a look at pagination links at: http://ekrawiectwo.net/board/thread/18/stroje-dla-dzieci-pajesi/?page=9 to see what I'm talking about.

If parameter page passed to sph_pagination tag is '-1' - this happens eg. for list of pages displayed for thread, then with compress=1 list of pages is limited to show only six links (three at the begining and three at the end). Again, take a look at this page: http://ekrawiectwo.net/board/show/8/nasze-dziela/ and notice links near thread with 'Xanti' word in its subject.

To use compress=1 call:
{% sph_pagination page pages '' 'page' 1 %}

Currently it is not used in original Sphene templates.

I've checked my site with Django Debug Toolbar and noticed that main page (categories list) generates about 260 database queries... another pages are also heavily using database.
I didn't found a way to reduce amount of queries by using eg. select_related so I've decided to add some caching to SCT.
Now, with caching enabled, amount of queries seems to be significantly reduced (for about half) but it is still rather big number.

I've added caching to _get_absolute_url in thread and category and for username rendering. I've also added some code to refresh cache when specific objects are changed.

Page: 1 2 Next

Please login to post a reply.

Powered by Sphene Community Tools