Skip to content
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

Allow bulk editing of event etc. publishers in admin #387

Open
Rikuoja opened this issue Feb 13, 2020 · 10 comments
Open

Allow bulk editing of event etc. publishers in admin #387

Rikuoja opened this issue Feb 13, 2020 · 10 comments
Assignees

Comments

@Rikuoja
Copy link
Contributor

Rikuoja commented Feb 13, 2020

Try out https://github.com/burke-software/django-mass-edit .

We probably don't want to allow mass editing text fields (unless there is a use case?), but at least publisher, location, event_status, publication_status, deleted and keywords might come in handy.

@Rikuoja Rikuoja changed the title Allow bulk editing of event etc. publishers Allow bulk editing of event etc. publishers in admin Feb 20, 2020
@Doatti Doatti self-assigned this Mar 3, 2020
@Doatti
Copy link
Contributor

Doatti commented Mar 3, 2020

I wasn't able to get it working. Trying to open the mass edit view causes an error:

TemplateSyntaxError
Invalid template name in 'extends' tag: ''. Got this from the 'base_site_template' variable.

This happens because the base_site_template context variable is set in each_context method in helusers custom admin site, but django-mass-edit isn't calling it. I think this could quite easily be fixed by forking django-mass-edit, but there might be some other problems.

@Doatti
Copy link
Contributor

Doatti commented Mar 23, 2020

Ok, I got it working by forking django-mass-edit and adding the call to each_context(). I also needed to change the url config for mass edit views to allow colons (:) in object IDs.

@Rikuoja What do you think about the idea of adding a dependency to a fork of django-mass-edit? The change I made is simply adding one line, so merging updates from upstream shouldn't be a big problem if it is needed.

The fork can be found here https://github.com/Doatti/django-mass-edit

@Doatti
Copy link
Contributor

Doatti commented Mar 24, 2020

I've made an issue and a PR to the django-mass-edit project. Here's a link to the issue burke-software/django-mass-edit#84

@Doatti
Copy link
Contributor

Doatti commented Mar 31, 2020

@Rikuoja exactly which models and fields should be allowed for mass edit?

@Rikuoja
Copy link
Contributor Author

Rikuoja commented Mar 31, 2020

Ah. I would add at least

-location
-publisher
-keywords
-audience

Does @aleksisalonen have any others in mind?

@Rikuoja
Copy link
Contributor Author

Rikuoja commented Mar 31, 2020

Perhaps also

-super_event

@aleksisalonen
Copy link
Contributor

Let's start with these:

publisher
provider
location
event_status (cancelled / suspended)
publication_status (draft / published)
deleted
keywords
audience
super_event
offers

@Doatti
Copy link
Contributor

Doatti commented Apr 1, 2020

Thanks, and should we only enable mass editing for Event objects?

@Doatti
Copy link
Contributor

Doatti commented Apr 1, 2020

Also include location_extra_info?

@Doatti
Copy link
Contributor

Doatti commented Apr 1, 2020

Let's start with these:

publisher
provider
location
event_status (cancelled / suspended)
publication_status (draft / published)
deleted
keywords
audience
super_event
offers

offers is not a field on the Event object. It can't be edited in admin.

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 a pull request may close this issue.

3 participants