Add get conference view to handle /<conference_slug> urls and act accordingly#647
Conversation
|
@ananyo2012 Can you please review this? |
|
@palnabarun There is a linter error can you fix that ? |
|
@palnabarun This is causing another issue since any url is being redirected as a conference url and its unable to find a conference in get_conference. Probably you need to put the url pattern at the very end so that an url will fallback to that if none of the defined urlpatterns match. |
99f2979 to
76beaf6
Compare
|
@ananyo2012 That stems from the fact that the root resource in Junction is assumed to be a conference slug. Ideally, the URL for the conference resource should have been So, in the current scenario, I would have liked to fix the URL's in the first place. But, it seemed to be a rabbit hole as the whole codebase needs to be searched for hardcoded URL's.
Will it not still result in a conference not found? I am a bit confused here with respect to the expectations. Can you please provide a map of the possible use case that you are thinking? |
76beaf6 to
a6cc9bf
Compare
|
@palnabarun Try going to
I like this solution. We need to see how much impact will it cause to the existing test cases and usability. |
Got it. I see a pattern now of which URL's will error out. |
|
On second thought having a |
…ordingly Two cases may exist when accessing `/<conference_slug>` : 1. Conference Exists - Redirect to `/<conference_slug>/proposals` 2. Conference Does not exist - Show 404 Page Integration Tests for the above cases are also added.
a6cc9bf to
5248bd8
Compare
|
Basic question:
Why? Let's, not dilly dally on what is there in the present. Maybe they started the routing keeping something in mind and then maybe thought that is not correct but had no way to change things at that point in time. Let's focus on what is correct and suits better. I couldn't find history and discussion related to the URL convention based on commits. |
|
Nevertheless, I have reorganized the URL order so that the routing works as expected. |
ananyo2012
left a comment
There was a problem hiding this comment.
Looks good now. Ship it!
|
LGTM. Regarding the hardcoded URLs, I'm personally OK to break existing URLs to completely restructure the application's URL structure. |
Two cases may exist when accessing
/<conference_slug>:/<conference_slug>/proposalsFixes #645