Commit Graph

843 Commits

Author SHA1 Message Date
David Smith 1024b5e74a Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate. 2021-07-29 06:24:12 +02:00
Carlton Gibson 3a45fea083 Fixed #21936 -- Allowed DeleteView to work with custom Forms and SuccessMessageMixin.
Thanks to Mariusz Felisiak for review.

Co-authored-by: Demetris Stavrou <demestav@gmail.com>
Co-authored-by: Caroline Simpson <github@hoojiboo.com>
2021-07-14 09:47:03 +02:00
Mateo Radman 8a7ac78b70 Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert" in various code. 2021-06-25 06:55:47 +02:00
Nick Pope d06c5b3581 Fixed #32366 -- Updated datetime module usage to recommended approach.
- Replaced datetime.utcnow() with datetime.now().
- Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp().
- Replaced datetime.utctimetuple() with datetime.timetuple().
- Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
2021-05-12 11:08:41 +02:00
Hasan Ramezani 8bcb00858e Fixed #32698 -- Moved HttpRequest.get_raw_uri() to ExceptionReporter._get_raw_insecure_uri(). 2021-04-30 08:05:42 +02:00
Mariusz Felisiak d68be0494b
Refs 32637 -- Made technical 404 debug page display exception message when URL is resolved.
Follow up to 3b8527e32b.
2021-04-27 08:40:52 +02:00
Mariusz Felisiak 3b8527e32b
Fixed #32637 -- Restored exception message on technical 404 debug page.
Thanks Atul Varma for the report.
2021-04-13 09:15:04 +02:00
Collin Anderson 1c004939d5 Fixed #32624 -- Avoided using JavaScript for "Local vars" show/hide in technical 500 debug page. 2021-04-09 06:33:53 +02:00
William Schwartz 9ee693bd6c Fixed #32316 -- Deferred accessing __file__.
Deferred accessing the module-global variable __file__ because the
Python import API does not guarantee it always exists—in particular, it
does not exist in certain "frozen" environments. The following changes
advanced this goal.

Thanks to Carlton Gibson, Tom Forbes, Mariusz Felisiak, and Shreyas
Ravi for review and feedback.
2021-04-01 14:33:30 +02:00
William Schwartz 7248afe12f Refs #32105 -- Moved ExceptionReporter template paths to properties.
Refs #32316.
2021-03-31 08:41:57 +02:00
Daniyal 7c08f26bf0 Fixed #32260 -- Made View.as_view() do not use update_wrapper().
View.as_view() should not use update_wrapper() for copying attributes
it's unintended and have side-effects such as adding `self` to the
signature.

This also fixes system check for arguments of custom error handler
views with class-based views.

Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2021-03-30 07:58:09 +02:00
Adam Johnson 0c0b87725b Refs #32260 -- Made admindocs and technical 404 debug page use view_func.view_class.
Internals of admindocs and technical 404 debug page should use the
view_class attribute and do not rely on __name__.
2021-03-30 06:51:27 +02:00
BeryCZ 807226cd79
Fixed #32480 -- Corrected docstring and removed redundant comments in django/views/defaults.py. 2021-02-24 21:32:37 +01:00
Haki Benita 3fd82a6241 Refs #32468 -- Added error message on invalid usage of cache decorators. 2021-02-24 10:13:51 +01:00
Sandro Covo 6822aa5c6c Fixed #32345 -- Fixed preserving encoded query strings in set_language() view.
Thanks Johannes Maron for the review.
2021-01-29 11:58:43 +01:00
Mariusz Felisiak d134b0b93e Refs #15902 -- Stopped set_language() storing user's language in the session.
Per deprecation timeline.
2021-01-14 17:50:04 +01:00
Thibaud Colas fecfec6deb Improved bidirectionality on the 'Congrats' page.
Follow up to 9012033138.
2020-11-24 13:03:35 +01:00
Thibaud Colas a1215a3237 Fixed #32053 -- Fixed accessibility issues on the 'Congrats' page.
- Add lang attribute.
- Use the same text for the page’s main heading, and title.
- Add underlines for all links in copy.
- Stop using h2 for link to the Django page.
- Use h1 for the main heading.
- Remove useless type attribute on style element.
- Remove grey text that fails contrast checks.
- Use a shade of grey that passes AAA contrast requirements.
- Stop using h4 for footer links.
- Add full stop in block-level links so VoiceOver correctly pauses
  between runs of text.
- Hide main artwork for screen reader users.
- Update SVG icons markup to be screen-reader friendly.
- Switch options to be block-level links.
- Remove unused markup.
2020-11-20 19:18:07 +01:00
Author: Nick Pope 20f2b822f8 Added explicit HTMLElement.dir attribute in templates. 2020-11-20 11:09:46 +01:00
Hasan Ramezani 4cd77f97a2 Refs #31672 -- Made technical 500 debug page include exceptions without tracebacks. 2020-11-10 13:21:50 +01:00
Carlton Gibson ad11f5b8c9 Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior. 2020-10-22 14:15:19 +02:00
Chris Jerdonek a492ccf0bc Refs #31672 -- Simplified ExceptionReporter.get_traceback_frames(). 2020-10-15 20:23:44 +02:00
Aarni Koskela 68e33b347d Fixed #32105 -- Added template paths as ExceptionReporter class attributes.
This allows replacement of the debugging templates without having to
copy-paste the `get_traceback_html` and `get_traceback_text` functions
into a subclass.

Thanks to Nick Pope for review.
2020-10-15 13:56:15 +02:00
Hasan Ramezani 78ae8cc5d8 Fixed #31674 -- Fixed displaying traceback in technical 500 debug page.
Previously, the technical 500 debug page didn't contain a traceback
when the exception chain contained an exception without traceback.

Thanks Chris Jerdonek for the report.
2020-10-12 10:25:36 +02:00
nik258heda 079deba530 Fixed #32087 -- Made technical 500 debug page use HTTPS for sharing traceback. 2020-10-12 06:29:36 +02:00
Thibaud Colas b807298c66 Fixed #32051 -- Fixed rocket animation on the 'Congrats' page.
- Fixed congratulations smoke being cropped.
- Refactored congratulation rocket so the animation can be stopped.
- Made animation respect user preference for reduced animation.
- Made rocket animation stop after 7s.
2020-10-01 11:55:26 +02:00
Thibaud Colas 838e115ab1 Refs #32051 -- Cleaned up CSS and SVG in the 'Congrats' page.
- Removed unnecessary vendor prefixes.
- Removed unused CSS and SVG code.
- Removed invalid CSS.
- Removed IE9-only browser reset styles.
- Fixed animation on Firefox.
2020-10-01 11:11:58 +02:00
Tom Carrick bcc2befd0e Fixed #31789 -- Added a new headers interface to HttpResponse. 2020-09-14 08:41:59 +02:00
Jon Dufresne 11ebc6479f Fixed #31791 -- Made technical 404 debug page display the tried URL patterns for Http404. 2020-09-07 06:54:19 +02:00
Jeremy Lainé 9c92924cd5 Fixed #31942 -- Made settings cleansing work with dictionary settings with non-string keys. 2020-08-26 11:59:37 +02:00
Mariusz Felisiak bb8f66934d Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context."
This reverts commit 4ed534758c.
2020-08-24 11:37:59 +02:00
Mariusz Felisiak 04e87e79a0 Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning."
This reverts commit 20799cc0a6.
2020-08-24 11:37:59 +02:00
Adam Johnson 20799cc0a6 Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning.
SimpleLazyObjects cause a crash when filtering.

Thanks Tim L. White for the report.
Regression in 4ed534758c.
2020-08-13 07:26:10 +02:00
Claude Paroz b23216d9d0
Refs #31493 -- Replaced var with const and let in JavaScriptCatalog template. 2020-08-05 08:08:46 +02:00
David Smith e74b3d724e Bumped minimum isort version to 5.1.0.
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
2020-07-30 10:58:59 +02:00
Tom Forbes f36862b69c Fixed #31674 -- Made technical 500 debug page respect __suppress_context__. 2020-07-13 08:06:21 +02:00
Jon Dufresne 0e6fa65ffd Refs #30400 -- Improved typography in debug and csrf templates. 2020-07-08 22:04:37 +02:00
Jon Dufresne dbae6de01e Simplified JavaScript with Array.prototype.includes().
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
2020-07-01 10:16:20 +02:00
Hasan Ramezani 8984cab8a8 Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-06-26 11:12:57 +02:00
Hasan Ramezani a59de6e89e Fixed #31675 -- Added warning to ExceptionReporter when exception chain has a cycle. 2020-06-10 09:23:33 +02:00
Jon Dufresne d6aff369ad Refs #30116 -- Simplified regex match group access with Match.__getitem__().
The method has been available since Python 3.6. The shorter syntax is
also marginally faster.
2020-05-11 12:01:28 +02:00
David Smith 2522559d1a Fixed #31534 -- Deprecated django.conf.urls.url(). 2020-05-05 07:34:34 +02:00
Ichlasul Affan 3e7c39f710 Fixed #31451 -- Made settings cleansing work with list and tuple settings. 2020-04-15 09:18:40 +02:00
Daniel Hahler 377018b6ff Fixed #30779 -- Improved selection of filenames in technical 500 debug page. 2020-04-09 11:28:26 +02:00
Adam Johnson 4ed534758c Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context. 2020-03-23 08:11:14 +01:00
Nick Pope 335c9c94ac Simplified imports from django.db and django.contrib.gis.db. 2020-02-04 13:20:06 +01:00
Claude Paroz 7fa0fa45c5 Refs #30997 -- Removed HttpRequest.is_ajax() usage. 2020-01-27 08:52:40 +01:00
Pavel Lysak 13e4abf83e Fixed #30752 -- Allowed using ExceptionReporter subclasses in error reports. 2020-01-16 15:25:49 +01:00
Flavio Curella d08d4f464a Fixed #30765 -- Made cache_page decorator take precedence over max-age Cache-Control directive. 2020-01-16 13:39:16 +01:00
Daniel Hahler 4fe486520f Fixed <span> nesting in technical 500 template. 2020-01-14 10:08:27 +01:00