I've been looking for this across the web and I've found some interesting approaches like Djando Activity Stream, but I want to develop my own application based on what is already done. What I specifically want is to know how to approach on developing a Facebook-like side bar that displays a activity stream based on actors, actions, objects and time. What is the most flexible database schema? How to implement it with an existing contacts application? How to make it personalized for every user? how to group related activities? Is it javascript the best way to handle the client side control?
I'm currently working with contentTypes and GenericRelations to be able to relate different application models. But I'm still not on track with this. Your help, tips and comments about how to develop this in the simplest and more flexible way will be very helpful.
I think this is the right package to use: django-notification Secondly you just use plain old jQuery and ajax calls to put the stream of request.user in the sidebar. you could also filter the action stream based on actor, object or something else.
Related
Problem Statement
I'm working on building out a single-page Django web app and am trying to implement the following functionality:
- All viewers of the page are associated with a state. There are buttons on the page which enable viewers to change their state.
- The application stores a list of all current viewers of the page, and their associated states. Whenever a user changes their state, this stored list of viewers updates with this new information.
- The application should display how many people are online (viewing the page) at a given time.
Blockers
I'm unsure of how to collect a list of all current viewers of a page in Django, nor how to collect how many users are currently viewing the page.
Ideally, my application would not require a login to use: therefore, I'd rather either associate viewer state with a user object that doesn't require sign-in, or not associate viewer state with a user object (I'm still new to user objects though, so forgive me if this point doesn't make complete sense).
What I'm Looking For
A discussion of higher-level strategies which I can use to implement this functionality, or other places to look to gain insight in tackling my problem. I'm pretty new to Django, so I'd appreciate it if answers also direct me to locations in my Django project which are of relevance (e.g. "Consider doing X in views.py, then..."). Alternatively, if there are GitHub projects you know of with similar functionality, if you could direct me to them to investigate further, that would also be appreciated.
I'd be happy to offer further clarification as required. Thanks in advance!
I am asp.net developer, currently switched to django. I am working on first app and have to maintain user data for some time and then send it to db unless user save button is clicked.
I want to know if django provides some kinds of alternatives to view states to store data temp within a webpage.
You didn't explain what "view states" are, but I guess you are looking for sessions.
Its unclear what you are actually looking for, because viewstates is just a way to preserve data.
If you need to store information for a particular user, but not commit it to a database, use sessions as Daniel suggested.
If you are create a multi-step form (also called a "wizard"), and need to preserve state between each step/form; use Form Wizard.
I'm quite new to all of this, so I apologize if the language I'm using isn't indicative of what I'm describing.
I am developing a Django app which my company will use to monitor bids at auctions which it sends out to various banks. I am at the stage now where the clients see the auction and its contents on one page, and we see pretty much the same thing on a different page. What I want to happen is for the clients to fill in their bids on all the things they want, hit "submit", whereupon on our (the admin) page, a new column pops into existence with the name of the bank and their bids on each item.
I don't think I can do this in jQuery. Do I have to use AJAX? PHP? Are all of these valid methods? I really don't know. Any help would be greatly appreciated.
I use PHP and Django. But the easiest way to build like that is with Django+Ajax.
I am tasked with creating a web form for people to update their details. I have existing data which I need to authenticate users against to make sure we are updating the correct person. I get the feeling that if I code this from scratch I will be reinventing the wheel.
I'm looking either for an online survey solution like SurveyMonkey (but not SurveyMonkey as it does no have automatic authentication) or a web form system that I can install and configure.
Seems like I need to build my own.
I will code in PHP and use a MySQL database. The login screen will take three bits of information, which if found in a record in the database, will show the user a screen with their old data, and a form for updating this data. They enter their new data and hit submit which will put their information into another table in the database.
Nothing to hard but I'd rather use a pre-made system which is already debugged and comes with with some built in tools so the users can manipulate the data.
I mean, there's any generic app that you can use to make notifications like when in Facebook, someone adds you as friend, or invite you to an event?
Basically, I need to show to the user this type of notification for different contents type, with the possibility to do some custom actions (ignore, accept, etc) different for each one.
I wonder if someone have done this before, so I can plug it and create a type of notification simply passing the text of the notification, the options that must show and the views to call for each option.
Thanks.
django-notifications is a GitHub notifications alike app, and it's based on Django Activity Stream.
If you familia with django-activity-stream, the the usage of django-notifications almost the same.
django-notifications also provide notifications_unread templatetag to display unread notifications of current login user.
Django Activity Stream does this, for the most part. It's a generic relationship manager that watches for save events in the datbase, and when a condition is met it puts an "event happened!" record into its own tables.
It would be incumbent upon you to then present that feed of events to the user, along with links to the actions (specific to your project) that you want him to take.
Even if it's not what you want, it's an excellent example of how to start.
Maybe this is more closer to my needs:
django-notification
https://github.com/jtauber/django-notification
any experience with that?
There is also django-notify: http://code.google.com/p/django-notify/