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

Refactor addMessage() function in Message.py #182

Open
2 tasks
eselkin opened this issue Sep 18, 2019 · 2 comments
Open
2 tasks

Refactor addMessage() function in Message.py #182

eselkin opened this issue Sep 18, 2019 · 2 comments

Comments

@eselkin
Copy link
Contributor

eselkin commented Sep 18, 2019

Context

The addMessage() function located in Message.py needs to be re-worked as it is currently 1) hard to debug and 2) needs to have a better logic for login status

Tasks

  • Separate the function into 2 functions based on login status
  • Refactor the function

Files

Dependence

  • None
@TeddyCr TeddyCr changed the title engage/views/Message/addMessage UGLY Refactor addMessage Dec 3, 2019
@TeddyCr TeddyCr changed the title Refactor addMessage Refactor addMessage() function in Message.py Dec 3, 2019
@TeddyCr
Copy link
Contributor

TeddyCr commented Dec 3, 2019

@eselkin do you have any recommendations on how you would like the function to be refactor? Could you also provide some details regarding the login status?

@eselkin
Copy link
Contributor Author

eselkin commented Dec 11, 2019

Login status is handled by django and should not be our focus. It is the standard operation of django to create a user object when a user is logged in.
Basically, I would consider taking the function and create two: 1. addMessage and 2. addMessageUser

The two are significantly different in how they process data (i.e. the User function does not need a user to add information about themselves each time they submit a message, because it is all contained in their profile)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Prioritized Backlog
Development

No branches or pull requests

2 participants