-
Notifications
You must be signed in to change notification settings - Fork 18
Bugfix: get the site to a template rendering state. #142
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
base: develop
Are you sure you want to change the base?
Conversation
if request.user.is_authenticated: | ||
profile = getattr(request.user, 'profile', None) | ||
if profile and profile.codename == 'candidate': | ||
try: |
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.
why not continue using get_object_or_404
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.
will fix that
@@ -14,7 +18,7 @@ | |||
|
|||
MANAGERS = ADMINS | |||
|
|||
ALLOWED_HOSTS = ['*'] | |||
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'spotaxis.com'] |
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.
this will prevent access to subdomains
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.
I was experimenting the with the page load issues, this was left like this accidentally.
'NAME': 'TRM_local', # Or path to database file if using sqlite3. | ||
'USER': 'TRM_user', # Not used with sqlite3. | ||
'PASSWORD': 'pass', # Not used with sqlite3. | ||
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
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.
idealy we should move to env, however for now we should be creating db with the same names to keep thing consistent between everyone.
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.
will fix that
@@ -67,11 +67,11 @@ | |||
<li class="hidden divider no-margin"></li> | |||
<li><a class="pt10 pb10" href="{% url 'auth_password_change' %}">Change Password <span class="glyphicon glyphicon-lock pull-right"></span></a></li> | |||
<li class="divider no-margin"></li> | |||
<li><a class="pt10 pb10" href="{{settings.HOSTED_URL}}{% url 'zinnia:entry_archive_index' %}" target="_blank">Resources <span class="fa fa-lightbulb-o fa-lg mr3 pull-right"></span></a></li> | |||
<li><a class="pt10 pb10" href="{{settings.HOSTED_URL}}" target="_blank">Resources <span class="fa fa-lightbulb-o fa-lg mr3 pull-right"></span></a></li> |
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.
retain old label as comment in case we want to enable again
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.
This cannot be done, we have to delete the code outright, commenting does not work. For future use, we will have to refer to old code
from datetime import date | ||
from django.shortcuts import render_to_response, redirect | ||
from datetime import date, timezone | ||
from django.shortcuts import render as render_to_response, redirect |
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.
looks like a redundant change, others have already resolved this, please verify this is in sync with develop
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.
will fix that
@@ -4,12 +4,15 @@ | |||
import ast | |||
import json | |||
import traceback | |||
|
|||
from pytz import utc |
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.
different import from datetime.timezone added by Sai
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.
will fix that
@@ -42,7 +43,7 @@ def entries_published(self): | |||
|
|||
def get_absolute_url(self): | |||
""" |
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.
Not reviewing zinnia files. These can be excluded from PR
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.
ok
Solved all the identified issues per the issues list.
Brought majority of the deprecated imports and method calls up to spec.
A few exceptions still exist.
For example, the
render_as response
method has been changed torender
, however for quick fixes I did import render as render as response to save time.A recent commit in the develop branch made by arjun changed the url pattern to
path
instead of there_path
i was using, so i switched a few parts of the url file back tore_path
to solve a few issues.NOTE: Please check the database configuration, make sure to match your local db server credentials.
PS: Please Ignore early commit messages, I did not expect to merge this branch.