Convert current user details, current user locale profile details, home, license, maintenance and tool list views to CBV
This commit is contained in:
@@ -252,3 +252,9 @@ def fs_cleanup(filename, suppress_exceptions=True):
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
def get_obj_from_content_type_string(string):
|
||||
model, pk = string.split(',')
|
||||
ct = ContentType.objects.get(model=model)
|
||||
return ct.get_object_for_this_type(pk=pk)
|
||||
|
||||
Reference in New Issue
Block a user