Thommond / tsct-portal

Recreation of the TSCT portal website
https://arcane-wildwood-15359.herokuapp.com/
MIT License
1 stars 1 forks source link

Put these Input Checkers in a Function #24

Closed ejmoyer closed 3 years ago

ejmoyer commented 4 years ago

https://github.com/Thommond/tsct-portal/blob/726cfcf86a15985093fd9002a2636478a2495e9e/portal/courses.py#L44-L95

I noticed code similar to this is repeated in other views as well throughout the project. I feel like you could put them in functions and just re-use them instead of repeating the whole sequence each time.

Thommond commented 4 years ago

I agree similarly with some of the validation checks for the URLs. I shall add that in later.

Thommond commented 3 years ago

I looked through the code and it seems although similar to the functions seen in other views it is not the same.