Skip to content

Conversation

@tremlab
Copy link
Contributor

@tremlab tremlab commented Jan 30, 2018

Added more detailed configuration examples. Updated to Django2 with Python3. (not backwards compatible, due to Django's dependency.)

@tremlab
Copy link
Contributor Author

tremlab commented Feb 5, 2018

a minor update to the notifier is needed to make this app compatible with the latest version of Django, but let me know any comments on the app itself.

Copy link
Contributor

@Cawllec Cawllec left a comment

Choose a reason for hiding this comment

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

Mostly nit-picking and stylistic changes, demo looks good!

On a larger note maintaining the older Django example would ensure the tests can be run against both Django 1 and 2. This could probably do with some discussion as integration tests are in the process of changing at the moment.

See `demo/views.py, #crash_with_callback`
1. Run the application. (Make sure to use any 3+ version of python.)
```shell
python3.6 manage.py runserver
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know that we want to go this granular with the python command, I think python would be better than python3.6

Basically, almost any unhandled exception sends a notification to Bugsnag.
Pressing this link would lead to an empty page, which is normal.
See `demo/views.py, #crash`
1. Before testing it, open up the `settings.py`
Copy link
Contributor

Choose a reason for hiding this comment

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

settings.py is found in bugsnag_demo, would it be worth pointing directly to the file i.e. bugsnag_demo/settings.py


MIDDLEWARE_CLASSES = (
MIDDLEWARE = (
# make sure to add Bugsnag to your middleware.
Copy link
Contributor

Choose a reason for hiding this comment

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

While this step is mentioned in the getting started docs, I think it can be overlooked and it may deserve a step in the readme.

</a>
<br>
<a href="/notifywithcontext">
<button type="button" id="typeError">MANUAL NOTIFICATION</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

MANUAL NOTIFICATION doesn't give a great indication of what the button is actually doing. It would be good to differentiate between that and HANDLED ERROR.

<br>
<br>
<div id="python">
<a href="crash/">
Copy link
Contributor

Choose a reason for hiding this comment

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

Stray underlines can be fixed with style="text-decoration:none;"

"api_key": "066f1ad3590596f9aacd601ea89af845"
}
```
Please note that while bugsnag-python is compatible with previous Python 2 and Django 1 versions -- however, this particular example app will only work with Python 3+ and Django 2+, to showcase the most current configurations. See [our documentation](https://docs.bugsnag.com/platforms/python/django/) for further details.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a good idea, but I also think it'd be good to maintain a Django 1.11 example, maybe in a django_legacy folder?

Copy link
Contributor

Choose a reason for hiding this comment

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

If anything, I'd call it django1.11 for clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good! I had built one, but then worried it would be too redundant. I'll rename it and submit in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added django 1.10 in this same PR.

@tremlab
Copy link
Contributor Author

tremlab commented Mar 15, 2018

thanks for the detailed notes! I believe my latest commits address all of them.

@Cawllec
Copy link
Contributor

Cawllec commented Apr 20, 2018

Looks good! I'd like to change the example directory name to django2 and we need to update the remote before merging, but otherwise seems fine. I need to fix the build as well as the tests require the correct example, so I'll take it from here.

@Cawllec
Copy link
Contributor

Cawllec commented May 2, 2018

This is probably going to require refactoring the tests from using the examples to using proper test-fixtures, which is going to take a little longer. This is still active though!

@Cawllec Cawllec mentioned this pull request May 9, 2018
@Cawllec
Copy link
Contributor

Cawllec commented May 14, 2018

Merged as a part of this PR

@Cawllec Cawllec closed this May 14, 2018
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