Can not edit foreign key field in Django admin and pop-up form is not really popping up - django-admin

I am using Django-suit for admin panel. My 'user' model has 'address' and 'contact' fields as foreign key. When trying to change the user's info, the address and contact fields has change/edit and add new options beside them. But the change/edit option remains disabled (see image).
Besides, when I click on add new icon, a new form window is supposed to pop-up. But instead it take me to the form in same browser tab. Any insight for solving this problem?

After getting question from #Efi MK, I tried once again to dig into the problem, and found my mistake with the help from this post (Django admin add related object doesn't open popup window?).
The main project was previously implemented using Django-1.6. I was extending the project by adding some new features using Django-1.11. The problem is, the static files I was using for Django-admin, were from previous version. The 'collectstatic' command didn't replace those files from previous version which has same name as new version. Unfortunately, I didn't notice that.
I deleted whole 'static' folder, ran 'collectstatic' again, and both of the problems mentioned in the question were solved. Thanks, Efi for asking :)

Related

Umbraco - editing preview window sidebar options

I have a project which is using Umbraco v7.7.9 installed with nuget.
I was wondering if it is possible to change the buttons displayed in the sidebar section when a user selects to preview a content node. Particularly I want to remove the option that allows the user to close the preview.
The reason I want to hide this option is because some of the content the backoffice users will be previewing will not actually be published yet so clicking the close preview button causes an error.
I first asked this question on the Umbraco forums but haven't received a response yet, here is the link to the question: https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/90878-editing-preview-window-sidebar-options
Thank you in advance.
Currently no - it would not be possible without doing hacks in the Core that would be overwritten when you upgrade your site (unless you manually merge your changes in when updating).
If you however don't mind doing that - the file used for the preview function is /umbraco/preview/index.html. You should look for the element with an exitPreview() click handler attached to it.
In later versions (7.10+) this modification will have to be done in /umbraco/Views/Preview/Index.cshtml instead, as these static files will be changed to MVC actions.

Cant create new team project in TFS 2010

I have an old setup with a tfs2010 and sql2008 and the current Collection is holding 3 team Projects. Now i want to create a new team project but for some reason i cant. it seems that it has something to do with the SQL Reporting that dosent excists. i get an error TF218027.
Ive been going through the setup and im wondering a bit
What exactly does the TFS use the reportServer for (MSDN dosent seem to want to tell me)
is there any way to create a Team project without the reporting
Will it damage my excisting data if i create and connect to a new sql reportServer
Hope someone will take the time to give an answer
thanks.
I have already tried the different approtaches discussed on different threads and im primarily looking for information on the 3 questions written above
Try the steps below:
In browser go to: http://application-tier/Reports/Pages/Folder.aspx
Press Folder settings button in the toolbar
Press New Role Assignment button in the toolbar
Specify user name in Group or user name field, check Content Manager role and press OK.
So for the people that actually read the question the answer is.
Keeps track of agile work progress
yes and its actually easy. go to the reporting service and stop it and then tell TFS not to report under reporting
Since it was never running the answer here is No

Rails security issue

I have a rails 4 app on heroku, users can choose an option from a drop down menu ( course name) then click post, and the post will appear on the index page. Someone was able to create a post with an option that was not in the drop down menu at all, how is this possible? What can I do about it?
First, the problem. It's very easy to recreate it using chrome developer. Here's the steps on recreating the error
Using chrome developer tool, find and inspect the dropdown
Right click on it and choose Edit as html
Add a new value to the dropdown
Select the new value and press create
Now the solution:
I will just add a validation that checks weather the value passed in is part of the options in the dropdown
http://edgeguides.rubyonrails.org/active_record_validations.html#inclusion
Put your options of drop-down menu to private method and permit only those values under your controller. No need to provide attr_accessible under your model if you are writing over there.

tfs work items can not be modified after user is renamed in Active Directory

TFS stores information about who created or who activated a work item and for some reason checks its validity whenever the work item is modified.
When a user is deleted from active directory or renamed in active directory, all work items even slightly has connection with the user can not be modified. Usually the error message is something like ...
TF20015: The field 'Activated By' contains the value 'blah blah blah' that is not in the list of supported values.
I've found a blogpost which recommends tweaking the TFS database, which is something not supported nor recommended by Microsoft.
What can be done to resolve this?
Thanks...
e-mre
Caveat: I'm not sure that this will work, and right now I'm not in a position to test it. However, I've had success with this approach on some other fields.
If you use the TFS Power Tools to edit the work item type definition, you should be able to change the Activated By field's rules and add an ALLOWEXISTINGVALUE rule to it. This might allow you to save those records when the AD name changes.
We've used this with some success with the Assigned To field.
I've seen this behaviour. It occurs if someone who activated a work item is removed from Active Directory (leaves the company) or if they change their name (gets married).
It's simple to fix, you just need to change the work item status from Active to Pending then back to Active this will change the "Activated By" field to the person chaging the status and the problem will be resolved.
Are you using TFS 2008? I seem to remember that this issue is fixed in 2010 (but I might have dreamt that)
If you have a lot of work items this blog might have a solution that helps automate the fix.

How to add "Project Description" in FogBugz?

When I create a new project (or even when I edit the Sample Project) there is no way to add Description to the project.
Or am I blind to the obvious?
There's no such thing as a project description, really. There's a column in the Projects page which is used so you can see which project is the default, built-in inbox, and we couldn't think of anything better to put as the column header for that column.
You are not crazy. It is used internally and not even stored in the database. I wondered the same thing when I first started using FogBugz, but found a forum entry to answer my question. As of today, I still don't think they have implemented it. Jump over to FogCreek and submit a request, if you would like to make it editable.
"Description" missing from Project?
How to Edit a Project Description
The description is mostly for system projects, like e-mail inbox.
You might be able to set one in the underlying DB table.

Resources