I am writing a Django view that should allow users to export selected records to Excel by selecting the records they'd like to export, then clicking an Export button on the Django Admin change list page. I have an if/else statement for this and I'd like my else: to basically reload the same change list page, but trigger a popup window error message if the user clicks "Export" without having selected any records to export. Something like "No records selected to export. Please try again." How would I accomplish this? TIA!
mercredi 24 août 2016
In Django, how to code else statement to reload same page and trigger error message pop-up?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire