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

Docs improve api docs #539

Merged
merged 6 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, thanks for looking at this - this line raises a warning during build because there is nothing in there - I just commented it to make it easy to find again later if we want to add any static assets

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can see the warning on line 7 of the Build docs phase of my other PR, which adds tests for pull requests that touch docs

https://github.com/jazzband/django-waffle/actions/runs/12378362580/job/34550046030


# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
34 changes: 22 additions & 12 deletions docs/types/flag.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,33 @@ Flag Attributes
Flags can be administered through the Django `admin site`_ or the
:ref:`command line <usage-cli>`. They have the following attributes:

:Name:
:name:
The name of the flag. Will be used to identify the flag everywhere.
:Everyone:
:everyone:
Globally set the Flag, **overriding all other criteria**. Leave as
*Unknown* to use other criteria.
:Testing:
:testing:
Can the flag be specified via a querystring parameter? :ref:`See
below <types-flag-testing>`.
:Percent:
:percent:
A percentage of users for whom the flag will be active, if no other
criteria applies to them.
:Superusers:
:superusers:
Is this flag always active for superusers?
:Staff:
:staff:
Is this flag always active for staff?
:Authenticated:
:authenticated:
Is this flag always active for authenticated users?
:Languages:
:languages:
Is the ``LANGUAGE_CODE`` of the request in this list?
(Comma-separated values.)
:Groups:
:groups:
A list of group IDs for which this flag will always be active.
:Users:
:users:
A list of user IDs for which this flag will always be active.
:Rollout:
:rollout:
Activate Rollout mode? :ref:`See below <types-flag-rollout>`.
:Note:
:note:
Describe where the flag is used.

A Flag will be active if *any* of the criteria are true for the current
Expand All @@ -85,6 +85,16 @@ are in the group *or* if they are in the 12%.
the actual proportion of users for whom the Flag is active will
probably differ slightly from the Percentage value.

Flag Methods
============

The Flag class has the following public methods:

:is_active:
Determines if the flag is active for a given request. Returns a boolean value.
:is_active_for_user:
Determines if the flag is active for a given user. Returns a boolean value.


.. _types-flag-custom-model:

Expand Down
18 changes: 14 additions & 4 deletions docs/types/sample.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,23 @@ Sample Attributes
Samples can be administered through the Django `admin site`_ or the
:ref:`command line <usage-cli>`. They have the following attributes:

:Name:
:name:
The name of the Sample.
:Percent:
:percent:
A number from 0.0 to 100.0 that determines how often the Sample
will be active.
:Note:
Describe where the Sample is used.
:note:
Describes where the Sample is used.



Sample Methods
==============

The Sample class has the following public methods:

:is_active:
Determines if the sample is active. Returns a boolean value.


.. _admin site: https://docs.djangoproject.com/en/dev/ref/contrib/admin/
Expand Down
17 changes: 13 additions & 4 deletions docs/types/switch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,26 @@ Switch Attributes
Switches can be administered through the Django `admin site`_ or the
:ref:`command line <usage-cli>`. They have the following attributes:

:Name:
:name:
The name of the Switch.
:Active:
:active:
Is the Switch active or inactive.
:Note:
Describe where the Switch is used.
:note:
Describes where the Switch is used.


.. _admin site: https://docs.djangoproject.com/en/dev/ref/contrib/admin/


Switch Methods
==============

The Switch class has the following public methods:

:is_active:
Determines if the switch is active. Returns a boolean value.


.. _types-custom-switch-models:

Custom Switch Models
Expand Down
Loading