Skip to content

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

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

Shaunaksb
Copy link

  • 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 to render, 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 the re_path i was using, so i switched a few parts of the url file back to re_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.

if request.user.is_authenticated:
profile = getattr(request.user, 'profile', None)
if profile and profile.codename == 'candidate':
try:
Copy link
Contributor

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

Copy link
Author

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']
Copy link
Contributor

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

Copy link
Author

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.
Copy link
Contributor

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.

Copy link
Author

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>
Copy link
Contributor

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

Copy link
Author

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
Copy link
Contributor

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

Copy link
Author

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
Copy link
Contributor

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

Copy link
Author

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):
"""
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants