← 输入框|github.com|刷新
Skip to content

Added Registration - #41

Merged
jarifibrahim merged 1 commit into
OpenSourceHelpCommunity:developfrom
vaibhavsingh97:develop
Jul 3, 2017
Merged

jarifibrahim merged 1 commit into
OpenSourceHelpCommunity:developfrom
vaibhavsingh97:develop

Conversation

@vaibhavsingh97

Copy link
Copy Markdown
Member

fixes #25
Screenshot after fix:
image
image
image
image

@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@tapasweni-pathak @nikhita @jarifibrahim Please review

@jarifibrahim jarifibrahim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@vaibhavsingh97 This is a huge pull request. You should never make these many changes in one PR. Always try to make atomic commits. :)

One more thing you should be careful about is the indentation settings in your IDE. I believe most of the changes in this PR have been made by the auto-format feature of the IDE.

BTW, I pulled your code and ran it locally. The registration and login process doesn't seem to work.
Please fix it. We cannot merge untill it works.

You just need to make some minor changes then we can merge your code. Good job :)

@@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file is generated by Pycharm and you shouldn't add it.

Please remove this file and all the files in the .idea directory.

Comment thread oshc/main/static/main/css/app.css Outdated
transition: opacity 0.7s ease-in-out;
font-family: "Montserrat", sans-serif
padding: 0;
margin: 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Most of the changes in this file are related to indentation. Please undo these indentation changes. It's preferable to use a tab size of 2 spaces in css files.

Comment thread oshc/main/templates/base.html Outdated
<span class="col-sm-6 left-align">
<li>
<a href="https://www.facebook.com/opensourcehelpcommunity/"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="https://www.facebook.com/opensourcehelpcommunity/"><i

@jarifibrahim jarifibrahim Jun 28, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fix indentation.

</form>

{% else %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unnecessary new line.

Comment thread oshc/oshc/settings.py Outdated

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv("DEBUG", False)
DEBUG = os.getenv("DEBUG", True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

DEBUG should be set to False.

Comment thread oshc/oshc/settings.py Outdated
)

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change this and following lines to os.getEnv('EMAIL_USE_TLS). This way it is easier to change the email server and related settings.

Comment thread oshc/main/templates/base.html Outdated
</div>
</div>
</nav>
<nav class="navbar navbar-inverse navbar-static-top navbar-fixed-top">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indentation error in the entire file.

Comment thread oshc/main/templates/base.html Outdated
<div class="col-xs-12">
<div class="social">
<ul>
<div class="container-fluid">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why change content to container-fluid?

Comment thread oshc/oshc/urls.py
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'', include('main.urls')),
url(r'^accounts/', include('registration.backends.simple.urls')),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You're using the simple backend and you've created the files (email related) for the default backend. You should include registration.backends.default.urls.

@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@jarifibrahim Thanks for reviewing. Can you please tell me the error?
Can we move to Slack for some discussion?

@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@jarifibrahim Updated the suggested changes. Please review again

@jarifibrahim jarifibrahim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The login/registration isn't working. Does it work on your machine?
Also, you might want to squash your commits into a single commit. Ping me on slack if you don't know how to do it.

body {
overflow-x: hidden;
padding-top: 50px;
margin-bottom: 120px;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change breaks the layout. You might want to remove it.

</li>
</span>
<span class="col-sm-6 backToTop right-align">
<span class="col-sm-6 back-to-top right-align">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indentation error.

Comment thread oshc/main/static/main/css/app.css Outdated
border-color: #24292e;
}

.container-fluid {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally, it is a bad idea to apply styles to bootstrap classes. What if container-fluid is used somewhere else on the same page? It will automatically get padding-left: 0px which is not the intended behavior. You should add your own class/id if you wish to tweak a bootstrap element.

<button type="submit"
class="btn btn-lg btn-primary btn-block">{% trans 'Submit' %}</button>
</div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unnecessary new line.

Comment thread oshc/main/templates/base.html Outdated
<script src="{% static "main/js/script.js"%}"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="{% static " main/js/script.js " %}"></script>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change static " main/js/script.js " to static "main/js/script.js"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@vaibhavsingh97

vaibhavsingh97 commented Jun 29, 2017 •

Copy link
Copy Markdown
Member Author

@jarifibrahim
capture1

@vaibhavsingh97

vaibhavsingh97 commented Jun 30, 2017 •

Copy link
Copy Markdown
Member Author

@tapasweni-pathak Please review and merge.
Steps to run this PR:

  • python manage.py migrate
  • python manage.py collectstatic
  • python manage.py runserver

@nikhita

nikhita commented Jul 1, 2017

Copy link
Copy Markdown
Contributor

Thanks for the instructions, @vaibhavsingh97! I checked the changes locally and it works perfectly. 🙌

@jarifibrahim @tapasweni-pathak Since you reviewed the PR, I'll leave it to you to merge it.

@jarifibrahim

Copy link
Copy Markdown
Member

Merging this since we have 2 approvals. Well done @vaibhavsingh97

@jarifibrahim
jarifibrahim merged commit 6ca6380 into OpenSourceHelpCommunity:develop Jul 3, 2017
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.

3 participants