Closed ejmoyer closed 3 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.
I agree similarly with some of the validation checks for the URLs. I shall add that in later.
I looked through the code and it seems although similar to the functions seen in other views it is not the same.
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.