My website runs under Django 1.6 and I'm using the very nice Django admin two box multi-selector widget for some of my site forms. I've just discovered, however, that the two box selector only appears in my forms for users who have staff/admin status. Everyone else sees the not so nice one box selector that requires scrolling and holding down the control key to find select multiple items.
I don't want to give all of these users access to the entire admin site. Is there a way to fix this? I can't seem to find where the check for admin rights is being made. It seems like this widget is pretty popular and I don't see similar questions, so I feel like I'm missing something.
Thanks for your help.
Since I still don't have any clear direction on this, I took the alternative action of adding code to assign is_staff=1 when users are given access to the forms that use the multi-select control and remove those rights when access is removed.
Related
I'm having a bit of trouble with Django again.
I have a simple e-commerce website project that I'm working on for my graduation. It sells books. I've got basic functionalities down, such as adding categories and products, client sign-ups and logins, a session-based shopping cart, a checkout page fully connected to a payment API, and an orders model to keep track of data.
My professor has asked me now to to add relevant reports in the Admin panel, talked to me a while about what would be relevant to see and all. So, I've got in mind what I'm hoping to make.
I want to have two containers in the main dashboard page, which would display some quick analytics (like, how many books the store has sold in the past seven days, how much money from sales the site has made in the past month), as well as links in the sidebar: I want each relevant app within my project to have their own reports section in the Admin panel, maybe led to from a link underneath their models. I've separated the storefront, accounts, orders, shopping cart, and checkout, for instance, in different apps
The problem is I can't really figure out how to actually... do that...
I've fiddled with the layout and templates on the admin; I've figured out how to add custom links to the admin page, and change its design elements, for instance. But I'm not sure how to link the data I want to the dashboard. It feels like the answer is right in front of me and I can't reach it...
I guess my question is, how can I add my reports to the Django admin page per app, and how can I add these containers that I want in the dashboard?
I've guessed that I have to start out by building a view for each report. So I am currently reading the Django docs on the Admin page again, as well as looking at questions similar to mine.
But any information y'all can share that could ease up this process and save me some time would be very much appreciated. Thanks so much!
PS: If it helps, I am overriding the admin templates by having all the .html pages copied on my project's templates folder - it's how I got it to display the store's header in the admin dashboard.
I'd like to create a tooltip bubbles for my site for new users - many other sites do this (most google apps). I'd like to show them for all accounts created within the last week, unless the user specifically 'dismisses' the tip.
I thought about doing this with cookies - ie. set a "-dismissed=True" value that I could check as well as the account creation date and determine whether to show the tips.
However - this doesn't work across browsers, since cookies aren't shared between browsers. So if a user logs into chrome, dismisses the tip then logs in in FF the tip will reappear.
Does anyone know if there is common way to do this sort of thing? Or at least a better way than what i've described?
I'm using browser length sessions so I can't store it in the session.
You could have a user preferences model, with a one-to-one relationship to the main user model, which stores preferences like this. Create an instance when the user entry itself is created, and default the 'show tips' field to True.
You could also use the new custom user model functionality in 1.5 to store this in the user model itself, but that seems like overkill here.
I'm new to Sharepoint and I try to create application pages (via visual studio).
I want to see the design of the pages without the administrator header and the left column. I want to see the page only without anything else to summarize.
Of course I tried to log-in with a read only user but i can't figure out how to remove those for the non-admin.
Is-it a permission setting? Or is it a template setting? Or something else?
Sorry if the question is stupid.
For the header, I have done this before by putting a control on the page which checks to see if the current user is an admin or not and if they are not an admin, the following CSS is added to the page
div#s4-ribbonrow
{
display: none;
}
Not sure if it is the best solution but I created a custom master page with code-behind to show/hide the unwanted parts depending on the rights.
Maybe some others solutions would be quicker but I had to create a master page for design reasons anyway.
I am in the process of adding Like buttons to all of the product pages on a website. I am using all of the proper open graph tags and an app_id and everything seems to be working fine. I will be using a version of the button that does not give you the Admin or Insights links to choose from. I am wondering if there is an easy way to access those pages without the links?
Even though I am listed as an admin of the App, I am not automatically listed as an admin of each of the product pages as they are created. The only way I have been able to do it is to:
Add the default Like button code to another area of the page.
Click on the admin link then add myself as a page admin.
Delete the extra button on the page.
Access the admin area by going to facebook/pages.
This will be a pain as I add in hundreds of products! Any advice would be appreciated.
I'm facing the same issue. Sadly your way of being admin of a page via an extra button didn't work for me.
I've found this related bug in facebook developers website : http://developers.facebook.com/bugs/160664854023586?browse=search_4e946433c82379f78564182
I'd like all my wordpress posts to be editable by all users, guests included.
does anybody know if this is possible?
I already tried all the "wiki" plugins but without success.
it's absolutely possible. However, there are certain step that require manual programming.
The step is:
create an edit page in non admin area
do the editing there (you can mimic admin's edit page or you just display the body only)
upon saving, you can, either create new user programmatically and assign that user as the editor (this, off course will require another table or another mechanism) or leave the editor as post's previous owner