Skip to content

Commit 8e4dc55

Browse files
docs: correct misplaced definition
1 parent 3404fd0 commit 8e4dc55

File tree

3 files changed

+42
-41
lines changed

3 files changed

+42
-41
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# auto section label configuration
4545
autosectionlabel_prefix_document = True
46-
autosectionlabel_maxdepth = 2
46+
autosectionlabel_maxdepth = 3
4747

4848
# Add any paths that contain templates here, relative to this directory.
4949
templates_path = ['_templates']

docs/guide/database.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,44 @@ When using ``order_by_value()``, children are ordered by their value.
330330
331331
users_by_value = db.child("users").order_by_value().get()
332332
..
333+
334+
335+
Helper Methods
336+
--------------
337+
338+
generate_key
339+
^^^^^^^^^^^^
340+
341+
``db.generate_key()`` is an implementation of Firebase's `key generation
342+
algorithm <https://www.firebase.com/blog/2015-02-11-firebase-unique-identifiers.html>`__.
343+
344+
See :ref:`multi-location updates<guide/database:multi-location updates>`
345+
for a potential use case.
346+
347+
348+
sort
349+
^^^^
350+
351+
Sometimes we might want to sort our data multiple times. For example, we
352+
might want to retrieve all articles written between a certain date then
353+
sort those articles based on the number of likes.
354+
355+
Currently the REST API only allows us to sort our data once, so the
356+
``sort()`` method bridges this gap.
357+
358+
.. code-block:: python
359+
360+
articles = db.child("articles").order_by_child("date").start_at(startDate).end_at(endDate).get()
361+
articles_by_likes = db.sort(articles, "likes")
362+
..
363+
364+
365+
Common Errors
366+
-------------
367+
368+
Index not defined
369+
^^^^^^^^^^^^^^^^^
370+
371+
+ `Indexing`_ is **not enabled** for the database reference.
372+
373+
.. _Indexing: https://firebase.google.com/docs/database/security/indexing-data

docs/guide/storage.rst

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -63,43 +63,3 @@ token.
6363
6464
storage.delete("images/example.jpg",user["idToken"])
6565
..
66-
67-
68-
Helper Methods
69-
--------------
70-
71-
generate_key
72-
^^^^^^^^^^^^
73-
74-
``db.generate_key()`` is an implementation of Firebase's `key generation
75-
algorithm <https://www.firebase.com/blog/2015-02-11-firebase-unique-identifiers.html>`__.
76-
77-
See multi-location updates for a potential use case.
78-
79-
80-
sort
81-
^^^^
82-
83-
Sometimes we might want to sort our data multiple times. For example, we
84-
might want to retrieve all articles written between a certain date then
85-
sort those articles based on the number of likes.
86-
87-
Currently the REST API only allows us to sort our data once, so the
88-
``sort()`` method bridges this gap.
89-
90-
.. code-block:: python
91-
92-
articles = db.child("articles").order_by_child("date").start_at(startDate).end_at(endDate).get()
93-
articles_by_likes = db.sort(articles, "likes")
94-
..
95-
96-
97-
Common Errors
98-
-------------
99-
100-
Index not defined
101-
^^^^^^^^^^^^^^^^^
102-
103-
+ `Indexing`_ is **not enabled** for the database reference.
104-
105-
.. _Indexing: https://firebase.google.com/docs/database/security/indexing-data

0 commit comments

Comments
 (0)