Skip to content

New subproject admin page #2957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 22, 2017
Merged

New subproject admin page #2957

merged 5 commits into from
Jun 22, 2017

Conversation

agjohnson
Copy link
Contributor

This replaces the list of text with a table that is more navigable and also
replaces the create form with a dropdown form of the projects you can add.
This list of projects is limited to projects you are the admin of, and
which have not been added as a sub or super project anywhere else.

This depends on #2954 and others.

The privacy app was a strange mixture of various application models managers,
querysets, and syncers. Instead, logic is moved to where we should be using it,
inside the other applications
This replaces the list of text with a table that is more navigable and also
replaces the create form with a dropdown form of the projects you can add. This
list of projects is limited to projects you are the admin of, and which have not
been added as a sub or super project anywhere else.

This depends on #2954 and others.
@agjohnson agjohnson added the PR: work in progress Pull request is not ready for full review label Jun 20, 2017
@agjohnson agjohnson requested a review from ericholscher June 20, 2017 17:18
@agjohnson agjohnson added PR: ready for review and removed PR: work in progress Pull request is not ready for full review labels Jun 20, 2017
Conflicts:
	readthedocs/projects/forms.py
@agjohnson
Copy link
Contributor Author

This should be ready for review now, I've merged in master.

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I'd like to see additions to the projects detail page that also show that it's a subproject, because that is currently confusing. I believe I hacked in a basic version of it in the header, but we could definitely be doing more to include the info about super/sub projects on detail pages, to make this stuff more understandable for users.


def __init__(self, *args, **kwargs):
self.project = kwargs.pop('project', None)
self.user = kwargs.pop('user', None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be checking for the existence of these variables here? Seems like it would throw errors accessing None later on.

class ProjectRelationshipDelete(ProjectRelationshipMixin, DeleteView):

def get(self, request, *args, **kwargs):
return self.http_method_not_allowed(request, *args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not already defined on the DeleteView? Seems odd it wouldn't disallow GET's already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, get on deleteview displays a form that asks for confirmation. I'd like to settle on a deleteview override and never use confirmation forms, but we do use them in some places currently.

@agjohnson agjohnson merged commit 2d4e004 into master Jun 22, 2017
@agjohnson agjohnson deleted the subproject-admin branch June 22, 2017 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants