Opened 7 years ago

Closed 7 years ago

#10376 closed (wontfix)

I need to point feeds to get their templates from my template directory

Reported by: RuslanPopov Owned by: nobody
Component: Generic views Version: master
Severity: Keywords: feed
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

For example, I have the following directory structure:

project_name
    app1
    app2
    templates
        app1
             feeds
        app2
             feeds

At this time Django requires that feeds directory is in project_name/templates.
I made a dirty hack to make my templates layout work.
May be it would helpful to realize such functionality by Django's developers.

Attachments (1)

feeds.diff (1.1 KB) - added by RuslanPopov 7 years ago.
Patch for syndication's feeds.py

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by RuslanPopov

Patch for syndication's feeds.py

comment:1 Changed 7 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

No patch that makes the assumption the app name is a specific part of the URL is going to be accepted, second why can't you just put your feed template at project_name/templates/feeds/ ?

comment:2 Changed 7 years ago by mtredinnick

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

I don't think this is worth doing. You can already put templates in app template directories (where the app-based template loader will find them). That's pretty common. If you wanted to do things in the way you've got above, you can hard-code the app name into the template load path.

Your patch seems to add a slightly similar, but not identical, template loading scheme to the app-based template loader. If you really wanted to do that, it would be better to write your own template loader that worked in exactly that way.

Note: See TracTickets for help on using tickets.
Back to Top