I am developing a Django app, I need to track users click for particular button.
Suppose I have 10 buttons and if logged in user clicks btn1, btn2, and btn5
then I want to store this to my database that user clicked these buttons
Related
I have added my django app to my iphone home screen with the safari bookmark. As it has been described here, when the app is opened trough this bookmark, the user is every time logged out.
I wonder how can I keep my user logged in to my django app.
Is there a way to manage this with Django?
I have a app that crashes Internet Explorer when clicked in an "Add" button in Django Admin.
It is a way to remove this popup functionality from Django?
Lets say I have a web application that displays 2 random buttons on each session, and I want the user to click on 1 button or the other. If a button is clicked, I want to increment the score for that button. However, the user has no control on what 2 buttons are presented each time and there are thousands of possible buttons.
If I create a view to increment the button, how would I be sure that the user wont just manually go to that view through the browser.
My thoughts are that you need to create a form and have users POST to a certain address, but how do you know that the user didn't just send a post request through AJAX to increment the button and that the user actually received that button from the randomized session with 2 buttons.
How would I handle this in Django is there documentation detailing how Django specifically supports this?
EDIT: Or do you have to create a unique session ID for each button selecting session and check each button click against the unique session ID.
Create a session variable to track the button they see, like:
def button_display_view(request):
# ...lots of cool logic
session['buttons_shown'] = [button_1_primary_key, button_2_primary_key]
return response
Then, in your button click view, ensure that the button clicked was in the list of buttons that they were shown. The user will have zero knowledge of your session variable, nor be able to edit it, much like he/she can't when you use session variables to track authentication, etc.
If you're building a multivariate testing system (or even an AB testing system), it might be worth checking out this MVT app for ideas.
I have an online e-commerce shop. What I want to do is that, when a user checks out with multiple products in its cart, he will be shown a facebook like button. If he clicks on this button, all the products selected should get liked by his facebook profile. i.e. single button -> multiple likes
Please advise how to do this.
P.S.
I am using Drupal 6 with Ubercart. Each product item has its own page and thus unique URL.
i've a proect opening with user authentication page (asking username and password). There are some extra buttons here which the app navigate to a single page when the user clicks (up to that point there is no need for table view but from those sub screens app can navigte back to that main page). In addition, if user is authenticated then the app will navigate to a page which lists some items on it (table view) and then navigate to some detail views back and forward. And i also want my app to have core data support.
Navigation based or window-based are two major possibilities, aren't they?
thanks
It sounds like you are building a navigation based app. If you look at your app without the login page, it sounds like a textbook navigation based app. Generally a login page will be handled by just using presentModalViewController on top of your existing navigation controller.