Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.467.552 Times

objtrack 0.2

Company: David Cramer
Date Added: August 21, 2013  |  Visits: 384

objtrack

Report Broken Link
Printer Friendly Version


Product Homepage
Download (40 downloads)



objtrack is a generic object view tracking model.<br /><br />This will store a "last viewed date" which says "everything that has changed" since this date, is unread. It also stores a list of primary keys, which has been read since that date.<br /><br />Installation:<br /><br />Download and install the package using distutils:<br /><br />pip install objtrack<br /><br />Update your settings.py and add the installed apps settings:<br /><br />INSTALLED_APPS = (<br /> 'django.contrib.admin',<br /> 'django.contrib.auth',<br /> 'django.contrib.contenttypes',<br /> 'django.contrib.sessions',<br /> 'objtrack',<br />)<br /><br />Finally, run python manage.py syncdb to create the database tables.<br /><br />Usage:<br /><br />Showing forums which have new posts in them:<br /><br />from objtrack.models import ObjectTracker<br /><br />def view_forum_list(request):<br /> categories = Category.objects.all()<br /><br /> tracking = ObjectTracker.objects.get_for_request(request, Thread)<br /><br /> # Don't forget you still need to update a date field when a new thread<br /> # is added to the forum.<br /> for category in categories:<br /> category.has_new_posts = tracking.has_viewed(category)<br /><br /> # Maybe we want to mark all forums as "i saw this" now?<br /> tracking.mark_all_as_viewed()<br /><br /> return render(...)<br /><br />Adding a has_viewed attribute to threads in the thread listing:<br /><br />def view_thread_list(request):<br /> threads = Thread.objects.all()<br /><br /> tracking = ObjectTracker.objects.get_for_request(request, Thread)<br /><br /> # This isn't the *best* approach to checking if it's been viewed, but it works<br /> for thread in threads:<br /> thread.has_viewed = tracking.has_viewed(thread)<br /><br /> return render(...)<br /><br />Marking the thread object as read when it's viewed:<br /><br />def view_thread(request, thread_id):<br /> thread = Thread.objects.get(pk=thread_id)<br /><br /> tracking = ObjectTracker.objects.get_for_request(request, Thread)<br /> tracking.mark_as_viewed(thread)<br /><br /> return render(...)<br /><br />You can also use it within Coffin or Django templates:<br /><br />{% load tracking %}<br /><br />{% for instance, has_viewed in queryset|with_tracking:"date_field" %}<br /> ...<br />{% endfor %}

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Added Attribute Categories Forum Forums Generic Install It039s Object Objecttrackerobjectsget Requestrequest Objtrack Return Thread Threads Tracking View Thread Listrequest Viewed
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


OBJTRACK RELATED
Modules  -  Show categories .3a 1.0
Shows categories in forums and topics with links to them. See section 'Author Notes' for more details and manual MOD installtion info.
 
Modules  -  Show categories .3a 1.0
Shows categories in forums and topics with links to them. See section 'Author Notes' for more details and manual MOD installtion info.
 
Modules  -  Show categories .3a 1.0
Shows categories in forums and topics with links to them. See section 'Author Notes' for more details and manual MOD installtion info.
 
GuestBooks  -  phpmysig Script 0.2
phpmysig is a guestbook that can easily be added to your forum- or guestbook- signature. It should work with all systems that use bbcode.Also some other functions are included like the actual date and time and the value of signature visits.
10 KB  
Libraries  -  Object::Relation::Meta::Attribute::Schema 0.1.0
Object::Relation::Meta::Attribute::Schema is a Perl module for Object::Relation database store builder. Synopsis # Assuming MyThingy was generated by Object::Relation::Meta and that were building # a data store schema. my $class =...
235.52 KB  
Networking  -  Automatic Store Feeds 3.0
This contribution is a combination of the Froogle (Google base), Yahoo, Bizrate, and the new Bidhopper Store Feed contributions plus the added admin configuration group for easy install. This contribution was created as an improvement to the...
 
GuestBooks  -  phpmysig 0.2
phpmysig is a guestbook that can easily be added to your forum- or guestbook- signature. It should work with all systems that use bbcode. Also some other functions are included like the actual date and time and the value of signature visits.
 
Portal Systems  -  DMG Forums 2.1
DMG Forums is a dynamic and scaleable forum/portal application for SQL Server. Completely customizable applications can be created with unlimited content pages or forum pages. Your entire site can be edited with feature-rich administration tools....
164 KB  
Development Tools  -  vuBB Community Forums 0.2.1
vuBB Community Forums, free forum / bulletin board software.
122.88 KB  
Network & Internet  -  SKForum 1.5
SKForum project is a forum application with a Wiki, comic system, guestbook, and address book. SKForum is an open source (see licensing) web-based J2EE forum application. But its so much more, its a comic system, an addressbook, a wiki, a...
2.9 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB  
Network & Internet  -  SQL Inject Me 0.4.5
SQL Inject Me is a Firefox extension used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack.
133.12 KB