Skip to content

Commit

Permalink
Correct example
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklinke committed Apr 30, 2022
1 parent 2d0579b commit a427806
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/usage_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Generate a sequence of every third integer from -12 to 12.
from django.db import models
from django_generate_series.models import generate_series

integer_sequence = generate_series(-12, 13, 3, output_field=models.IntegerField)
integer_sequence = generate_series(-12, 12, 3, output_field=models.IntegerField)

for item in integer_sequence:
print(item.term)
Expand All @@ -34,7 +34,7 @@ SELECT
FROM
(
SELECT
generate_series(-12, 13, 3) term
generate_series(-12, 12, 3) term
) AS django_generate_series_integerfieldseries;
```

Expand All @@ -48,7 +48,7 @@ To include the `id` field in any sequence, set `include_id=True`. This does add
from django.db import models
from django_generate_series.models import generate_series

integer_sequence = generate_series(-12, 13, 3, include_id=True, output_field=models.IntegerField)
integer_sequence = generate_series(-12, 12, 3, include_id=True, output_field=models.IntegerField)

for item in integer_sequence:
print(item.id, item.term)
Expand Down Expand Up @@ -80,7 +80,7 @@ FROM
FROM
(
SELECT
generate_series(-12, 13, 3) term
generate_series(-12, 12, 3) term
) AS seriesquery
) AS django_generate_series_integerfieldseries;

Expand Down

0 comments on commit a427806

Please sign in to comment.