Skip to content
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

Add demo embedding and addition of logs #26

Merged
merged 3 commits into from
Aug 26, 2017
Merged

Add demo embedding and addition of logs #26

merged 3 commits into from
Aug 26, 2017

Conversation

gupta-utkarsh
Copy link
Member

  • Add support for demo embedding from origami.
  • Add saving of logs for each demo.
  • Remove news tab from navbar.
  • Direct contribute to section on landing page.

)
i += 1
except Exception:
pass
Copy link
Member

Choose a reason for hiding this comment

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

@uttu357 can we log the Exception in the logger?

"""
demo = Demo.objects.get(permalink=demo_permalink)
if not demo:
return Response('Unexpected Error', status=status.HTTP_404_NOT_FOUND)
Copy link
Member

Choose a reason for hiding this comment

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

Can we please return a dictionary instead of simple text. Something like

{"error": "Demo not found!"}                                        # for error messages
{"message": "Successfully created the demo!"}        # for successful messages

demo = Demo.objects.get(permalink=demo_permalink)
if not demo:
error_message = {'error': 'Demo not found!'}
return Response(json.dumps(error_message), status=status.HTTP_404_NOT_FOUND)
Copy link
Member

Choose a reason for hiding this comment

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

I think that there is no need to do the json.dumps()

text_type='Output'
)

return Response('OK', status=status.HTTP_200_OK)
Copy link
Member

Choose a reason for hiding this comment

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

Please return dict in Response() instead of simple string. Please make this change everywhere in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok

@gupta-utkarsh
Copy link
Member Author

@deshraj Made the changes.

Copy link
Member

@deshraj deshraj left a comment

Choose a reason for hiding this comment

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

Looks good. :)

@deshraj deshraj merged commit 977d9bf into develop Aug 26, 2017
@deshraj deshraj deleted the demo-embed branch August 26, 2017 21:01
deshraj pushed a commit that referenced this pull request Oct 30, 2017
* CI/CD Setup: Add AWS and Docker scripts (#10)

* Backend: Add django models (#11)

* Fix docker script and superuser script (#12)

* Add Coveralls and Raven Configuration (#13)

* fix(docker-compose): Minor change in docker script (#15)

* Add Web App API (#14)

* feat(api): Add serializers

* Add api for contact

* feat(contact-api): Add tests

* feat(web_team): Add api and tests to retrieve team members

* Minor fix

* fix(settings): Minor dev settings fix

* Settings: Add datadog for logging (#16)

* Add middleware for saving request metrics (#17)

* fix(datadog): Add middleware for saving request metrics

* fix(middleware): Minor style fixes

* Add news and showcase frontend (#18)

* fix(docker): Fix nodejs docker script (#19)

* fix(express): Fix express dist script (#20)

- Remove unused socket.io dependency

* Fixed padding issues (#24)

* Added instructions for non-ssh users in README (#25)

* Feat(admin): Add analytics dashboard to django admin (#27)

* Add contact us feature (#28)

* Add demo embedding and addition of logs (#26)

* Minor fix on demo page (#29)
@gupta-utkarsh gupta-utkarsh removed the test label Dec 1, 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.

2 participants