-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added HttpResponseRedirect to views.py and assigned in to oscnRedirec… #80
Conversation
…t function, getting a different type of error, please check if I've done it correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @Serhazor.
The issue is that a full URL was needed, but a relative URL was used. The solution is not to make the relative URL work with a redirect, but to change the URL. See my suggested changes, and please revert the changes to urls.py
and views.py
.
website/templates/index.html
Outdated
@@ -110,7 +110,11 @@ <h4>1. How do I know my OSCN Case Number?</h4> | |||
</div> | |||
<div class="col-sm-6"> | |||
<h4>2. What if I still can't find my case number?</h4> | |||
<p>Check with your public defender or search your name online at <a href=“www.oscn.net/dockets/search.aspx”>www.oscn.net/dockets/search.aspx </a> </p> </div> <div class="col-sm-6"> | |||
<p>Check with your public defender or search your name online at <a href="http://{{oscnRedirect}}">www.oscn.net/dockets/search.aspx </a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how to make the URL an absolute URL:
<p>Check with your public defender or search your name online at <a href="http://{{oscnRedirect}}">www.oscn.net/dockets/search.aspx </a> | |
<p>Check with your public defender or search your name online at <a href="https://www.oscn.net/dockets/search.aspx">www.oscn.net/dockets/search.aspx</a> |
</p> | ||
</div> | ||
|
||
<div class="col-sm-6"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 good job reformatting this section
website/urls.py
Outdated
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these extra lines
website/views.py
Outdated
@@ -12,6 +12,9 @@ | |||
|
|||
from alerts.models import Alert | |||
|
|||
def oscnRedirect(request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to this file is not needed to fix the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…t function, getting a different type of error, please check if I've done it correctly