Code

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#21210 closed Cleanup/optimization (fixed)

Custom template tags documentation should note that a restart of runserver is neede after creating the templatetags directory

Reported by: gergely@… Owned by: nobody
Component: Documentation Version: master
Severity: Normal Keywords: afraid-to-commit
Cc: eromijn@…, EvilDMP Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

While developing with Django, I got used to the fact that I hardly ever need to restart my runserver instance. However, after creating my first templatetags directory, it took me an hour or so until I have realized that I have to do it if I want to use my new filter. Maybe a note should be added to the corresponding documentation on this?

Attachments (0)

Change History (7)

comment:1 Changed 9 months ago by erikr

  • Cc eromijn@… added
  • Easy pickings set
  • Needs documentation set
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.5 to master

I agree with the issue, but it's a little wider: the automatic runserver refresh will pick up changes to existing files, but not addition of new files, as far as I remember. Documenting this in every place where users are instructed to create new files, might be overkill.

However, I also don't see it in the runserver docs: https://docs.djangoproject.com/en/dev/ref/django-admin/#runserver-port-or-address-port. To help newbies, a note in the tutorial might also be useful.

So, I think there is definitely room for improvement here, and that we should:

  • Validate what the actual behaviour of runserver is with regards to new files.
  • Add this to the runserver reference documentation.
  • Add a small note to the runserver section of the tutorial.

comment:2 Changed 9 months ago by timo

  • Type changed from Uncategorized to Cleanup/optimization

There's a note about this in the custom template tag docs (second paragraph). Agreed that we could describe the behavior in general elsewhere.

comment:3 Changed 9 months ago by EvilDMP

  • Cc EvilDMP added
  • Keywords afraid-to-commit added

I've marked this ticket as especially suitable for first-time committers or people following the Don't be afraid to commit tutorial. If you're tackling this ticket, please don't hesitate to ask me for guidance if you'd like any, either here or on the Django IRC channels, where I can be found as EvilDMP.

comment:4 Changed 9 months ago by bouke

  • Has patch set

Submitted my second Django PR: https://github.com/django/django/pull/1736

comment:5 Changed 9 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 9b7d38ed5a9eed21c496abb1b874cfe53da9c9c9:

Fixed #21210 -- Documented when runserver doesn't auto-restart.

Thanks gergely at polonkai.eu for the suggestion.

comment:6 Changed 9 months ago by Tim Graham <timograham@…>

In da181056a9e111c7564127cb67df6f186a485c17:

[1.6.x] Fixed #21210 -- Documented when runserver doesn't auto-restart.

Thanks gergely at polonkai.eu for the suggestion.

Backport of 9b7d38ed5a from master

comment:7 Changed 9 months ago by Tim Graham <timograham@…>

In 5c1be8a870f9783c4164cf09b1e9db3205ad1f1e:

[1.5.x] Fixed #21210 -- Documented when runserver doesn't auto-restart.

Thanks gergely at polonkai.eu for the suggestion.

Backport of 9b7d38ed5a from master

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.