You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by Credentive-Sec December 31, 2022
I have a dango project with three applications. Two of them have Models called "Review Comment". The models are identical, but the different applications show different objects based on filtering - note that the Models for the apps are maintained in separate tables in the database, since they are in different applications
I have set up separate Serializers and ViewSets - the view sets apply proper filtering.
in the project's url.py I have the following code (snippet):
these views show "ComplianceStatementReview" objects and "ReviewComment" objects for each of their applications.
When I visit the review manager HTML render page in DRF, I see the following: "review_manager_review_comments": "http://localhost:8000/reviewmanager/api/v1/review_manager_review_comments/"
When I visit the compliance manager HTML Render page in DRF, I see the following: "compliance_manager_review_comments": "http://localhost:8000/**reviewmanager**/api/v1/review_manager_review_comments/"
Note the the compliance manager HTML page refers to the review manager URL
I see the expected data, so the issue is just api_root. I have confirmed that the same behavior occurs on the JSON rendered page, so it's not an issue with the HTML interface.
After experimenting with a lot of different changes, I have notice that the issue is caused because the Models in the application have the same name. If I change the model name in the application, the URL is rendered correctly.
I can change the model name, but I still think this is probably a bug.
Happy to provide more code and detail if needed.
The text was updated successfully, but these errors were encountered:
Discussed in #8824
Originally posted by Credentive-Sec December 31, 2022
I have a dango project with three applications. Two of them have Models called "Review Comment". The models are identical, but the different applications show different objects based on filtering - note that the Models for the apps are maintained in separate tables in the database, since they are in different applications
I have set up separate Serializers and ViewSets - the view sets apply proper filtering.
in the project's url.py I have the following code (snippet):
these views show "ComplianceStatementReview" objects and "ReviewComment" objects for each of their applications.
When I visit the review manager HTML render page in DRF, I see the following:
"review_manager_review_comments": "http://localhost:8000/reviewmanager/api/v1/review_manager_review_comments/"
When I visit the compliance manager HTML Render page in DRF, I see the following:
"compliance_manager_review_comments": "http://localhost:8000/**reviewmanager**/api/v1/review_manager_review_comments/"
Note the the compliance manager HTML page refers to the review manager URL
If I manually visit the appropriate URL,
http://localhost:8000/compliancemanager/api/v1/compliance_manager_review_comments/
I see the expected data, so the issue is just api_root. I have confirmed that the same behavior occurs on the JSON rendered page, so it's not an issue with the HTML interface.
After experimenting with a lot of different changes, I have notice that the issue is caused because the Models in the application have the same name. If I change the model name in the application, the URL is rendered correctly.
I can change the model name, but I still think this is probably a bug.
Happy to provide more code and detail if needed.
The text was updated successfully, but these errors were encountered: