mirror of
https://github.com/django/django.git
synced 2025-06-16 00:49:12 +00:00
Removed some unnecessary PHP references from documentation.
This commit is contained in:
parent
adae619426
commit
a4f6b48daa
@ -184,7 +184,7 @@ Design your URLs
|
|||||||
|
|
||||||
A clean, elegant URL scheme is an important detail in a high-quality web
|
A clean, elegant URL scheme is an important detail in a high-quality web
|
||||||
application. Django encourages beautiful URL design and doesn't put any cruft
|
application. Django encourages beautiful URL design and doesn't put any cruft
|
||||||
in URLs, like ``.php`` or ``.asp``.
|
in URLs.
|
||||||
|
|
||||||
To design URLs for an app, you create a Python module called a :doc:`URLconf
|
To design URLs for an app, you create a Python module called a :doc:`URLconf
|
||||||
</topics/http/urls>`. A table of contents for your app, it contains a mapping
|
</topics/http/urls>`. A table of contents for your app, it contains a mapping
|
||||||
@ -289,7 +289,7 @@ lookup and function calls.
|
|||||||
Note ``{{ article.pub_date|date:"F j, Y" }}`` uses a Unix-style "pipe" (the "|"
|
Note ``{{ article.pub_date|date:"F j, Y" }}`` uses a Unix-style "pipe" (the "|"
|
||||||
character). This is called a template filter, and it's a way to filter the value
|
character). This is called a template filter, and it's a way to filter the value
|
||||||
of a variable. In this case, the date filter formats a Python datetime object in
|
of a variable. In this case, the date filter formats a Python datetime object in
|
||||||
the given format (as found in PHP's date function).
|
the given format.
|
||||||
|
|
||||||
You can chain together as many filters as you'd like. You can write :ref:`custom
|
You can chain together as many filters as you'd like. You can write :ref:`custom
|
||||||
template filters <howto-writing-custom-template-filters>`. You can write
|
template filters <howto-writing-custom-template-filters>`. You can write
|
||||||
|
@ -1597,13 +1597,8 @@ If ``value`` is ``"String with spaces"``, the output will be
|
|||||||
|
|
||||||
Formats a date according to the given format.
|
Formats a date according to the given format.
|
||||||
|
|
||||||
Uses a similar format to PHP's `date()
|
|
||||||
<https://www.php.net/manual/en/function.date.php>`_ function with some
|
|
||||||
differences.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
These format characters are not used in Django outside of templates. They
|
These format characters are not used in Django outside of templates.
|
||||||
were designed to be compatible with PHP to ease transitioning for designers.
|
|
||||||
|
|
||||||
.. _date-and-time-formatting-specifiers:
|
.. _date-and-time-formatting-specifiers:
|
||||||
|
|
||||||
@ -1657,10 +1652,7 @@ Format character Description Example output
|
|||||||
``i`` Minutes. ``'00'`` to ``'59'``
|
``i`` Minutes. ``'00'`` to ``'59'``
|
||||||
``s`` Seconds, 2 digits with leading zeros. ``'00'`` to ``'59'``
|
``s`` Seconds, 2 digits with leading zeros. ``'00'`` to ``'59'``
|
||||||
``u`` Microseconds. ``000000`` to ``999999``
|
``u`` Microseconds. ``000000`` to ``999999``
|
||||||
``a`` ``'a.m.'`` or ``'p.m.'`` (Note that ``'a.m.'``
|
``a`` ``'a.m.'`` or ``'p.m.'``.
|
||||||
this is slightly different than PHP's
|
|
||||||
output, because this includes periods
|
|
||||||
to match Associated Press style.)
|
|
||||||
``A`` ``'AM'`` or ``'PM'``. ``'AM'``
|
``A`` ``'AM'`` or ``'PM'``. ``'AM'``
|
||||||
``f`` Time, in 12-hour hours and minutes, ``'1'``, ``'1:30'``
|
``f`` Time, in 12-hour hours and minutes, ``'1'``, ``'1:30'``
|
||||||
with minutes left off if they're zero.
|
with minutes left off if they're zero.
|
||||||
|
@ -1009,7 +1009,7 @@ Session IDs in URLs
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
The Django sessions framework is entirely, and solely, cookie-based. It does
|
The Django sessions framework is entirely, and solely, cookie-based. It does
|
||||||
not fall back to putting session IDs in URLs as a last resort, as PHP does.
|
not fall back to putting session IDs in URLs as a last resort.
|
||||||
This is an intentional design decision. Not only does that behavior make URLs
|
This is an intentional design decision. Not only does that behavior make URLs
|
||||||
ugly, it makes your site vulnerable to session-ID theft via the "Referer"
|
ugly, it makes your site vulnerable to session-ID theft via the "Referer"
|
||||||
header.
|
header.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user