merge action in django admin
This is a merge function for django admin
- admin
This is a merge function for django admin
First version Apr 9 09
Code to add an 'AddThis' button to your blog posts. Simply do: {% add_this post.title post.get_absolute_url %} Also, specify your ADD_THIS_USERNAME to your settings. <!-- blog/add_this.html --> <script type="text/javascript">var addthis_pub="{{ username }}";</script> <a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '{{ site.domain }}{{ url }}', '{{ site.name }} - {{ title }}')" onmouseout="addthis_close()" onclick="return addthis_sendto()"> <img src="http://s7.addthis.com/static/btn/lg-addthis-en.gif" width="125" height="16" border="0" alt="" style="border:0"/></a> <script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
http://sciyoshi.com/blog/2008/aug/27/using-akismet-djangos-new-comments-framework/
This dead-simple piece of middleware adds a terrific security feature to django authentication. Currently, users who's accounts are de-activated still may have a cookie and a login session. This middleware destroys that session on their next request. Simply add this class into a middleware.py and add it to your settings.
**updated 12/16/08** I run several blogs by visual-artists and web-designers who want a quick way to insert images into their blog without the awkwardness of WSYIWYG and without the technicality of code (eww...). Thanks in advance for your input. #Syntax in a blog goes: [[thumb:the-image-slug]] # Gives you a thumbnail [[image:the-image-slug]] # Presents full-size-image Then of course: {% blog.post|yeagowiki %} You will also need to create some templates (see snippet). Here's a sample: <!-- /templates/photologue/image_snippet.html --> <div class="photologue-image"> <a href="{% if url %}{{ url }}{% else %}/media/{{ image.image }}{% endif %}"> <img src="{{ image.get_display_url }}" /> </a> <p class="photologue-image-caption">{{ image.caption }}</p> </div>
yeago has posted 10 snippets.