Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
R
roomlist
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • SRCT
  • roomlist
  • Issues
  • #113

Closed
Open
Opened Jun 16, 2017 by Daniel W Bond@dbond2Developer

only add message to update student if information changed

Right now a message is displayed if the form is valid on post in the UpdateStudent view. This states "Your profile was successfully updated!". This message displays regardless of whether or not information was actually changed: if you hit post without changing anything, this message will still display, but will not be accurate.

Instead of using the form_valid_message attribute in FormView, add logic to the form_valid method to add a message that "your profile was successfully updated" only if there were any changes. If you can think of something else to add if no information was changed that isn't mean (congratulations on hitting the post button, buddy, but you forgot to actually change anything), add that message to the django message queue instead.

I would review other websites, and see what their action is when you submit a form on your profile page without actually updating anything.

Assignee
Assign to
2.0 "Blue Ridge"
Milestone
2.0 "Blue Ridge" (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: srct/roomlist#113