ページの作成

ページの作成

親となるページを選択してください。

ページは必ず何かしらの親ページに紐づきます。
親ページに紐づくページを子ページといいます。
例: 親=スポーツ, 子1=サッカー, 子2=野球

子ページを親ページとして更に子ページを作成することも可能です。
例: 親=サッカー, 子=サッカーのルール

親ページはいつでも変更することが可能なのでとりあえず作ってみましょう!
テンプレートを更新

5. djangoにおけるテンプレート名の重複について(同名のhtml)

template_name = 'index.html'

return render(request, template_name)

djangoにおいて上記の様に単にindex.htmlを指定するだけでは非常に危険です。

djangoは自動的にルートディレクトリおよびアプリケーションディレクトリ直下とtemplatesフォルダ内のテンプレート名を取得します。

もし仮に異なるアプリ間で同名のindex.htmlが存在すると、意図しないindex.htmlが読み込まれる可能性があります。

従ってテンプレート名を指定する場合はアプリケーション名込みで指定する必要があります。

 

まずテンプレートディレクトリの配置構造を以下の様にしましょう。

プロジェクト名/
    manage.py
    アプリケーション名/
        template/
            アプリケーション名/
                index.htm

少し冗長的ですが、静的ファイルのディレクトリ構造と同様にテンプレートも上記のような構造にする必要があります。

ビューからの呼び出しは以下の様に指定します。

template_name = 'calculator/index.html'

return render(request, template_name)

 

子ページ
子ページはありません
同階層のページ
  1. Templateの使用準備
  2. Templateの定義方法
  3. テンプレートの作成と共通化
  4. setting.pyにおけるテンプレートの設定
  5. テンプレートの名前の重複について
  6. 静的ファイルの読み込み
  7. if文
  8. テンプレートで定数を使用する方法
  9. aタグのhrefの記載方法

最近の質問

コメント一覧

    No.90 | guest | 2022-06-25 09:49:26

    hack online slots [url="https://www-slotmachines.com"]slots machine[/url] slots house of fun

    No.89 | guest | 2022-06-24 14:01:21

    life of luxury slots [url="https://slotmachinesworld.com"]hack online slots[/url] jackpot magic slots blog

    No.88 | guest | 2022-06-23 17:52:02

    huge casino slots [url="https://slotmachinesforum.net"]caesars online casino[/url] playme777

    No.87 | guest | 2022-06-22 21:43:16

    house of fun free slots [url="https://slotmachinescasinos.com"]casino world free slots[/url] pogo slots

    No.86 | guest | 2022-06-22 04:07:54

    slots machines [url="https://slotmachinescafe.com"]free slots from vegas[/url] scatter slots cheats

    No.85 | guest | 2022-06-21 05:55:36

    free video slots 888 [url="https://slotmachineonlinegratis.org"]casino slots online svierge[/url] old vegas slots on facebook

    No.84 | guest | 2022-06-20 09:19:56

    play free lucky 777 slots [url="https://slotmachinegameinfo.com"]vegas 7 online casino[/url] free slots on

    No.83 | guest | 2022-06-19 12:08:28

    wms slots free online [url="https://slotmachinegambler.com"]viva video slots free[/url] free casino slots instant play

    No.82 | guest | 2022-06-18 14:36:27

    slot machine [url="https://pennyslotmachines.org"]free fun slots no download[/url] vegas slots

    No.81 | guest | 2022-06-17 17:14:02

    ceaser slot [url="https://giocoslotmachinegratis.com"]playme777[/url] super lucky casino slots

    No.80 | guest | 2022-06-16 21:14:53

    free slot machine games no dow loading [url="https://freeonlneslotmachine.com"]atari vegas world free slots[/url] 100% free casino slot games

    No.79 | guest | 2022-06-16 02:13:33

    san manuel free slots [url="https://download-slot-machines.com"]machine casino[/url] big casinГІ

    No.78 | guest | 2022-06-14 18:29:02

    simslots [url="https://candylandslotmachine.com"]slots of vegas instant play[/url] free bonus slots

    No.77 | guest | 2022-06-13 22:23:35

    quick hit slots on facebook [url="https://beat-slot-machines.com"]free slots games online[/url] 8pm news slots

    No.76 | guest | 2022-06-13 02:07:55

    las vegas slots free play [url="https://411slotmachine.com"]play free vegas slots[/url] free mobile bets

    No.75 | guest | 2022-06-12 05:49:04

    games free slots [url="https://2-free-slots.com"]slots to play online[/url] slot machine email

    No.74 | guest | 2022-06-09 01:43:18

    winning slots [url="https://411slotmachine.com"]mirror ball slots[/url] battle slots download

    No.73 | guest | 2022-06-07 04:51:15

    slots inferno [url="https://2-free-slots.com"]filthy rich slots free[/url] caesars casino slots

    No.72 | guest | 2022-05-20 10:34:19

    best dissertation writing service [url="https://mydissertationwritinghelp.com"]dissertation writing scams[/url] dissertation year fellowship ucla

    No.71 | guest | 2022-05-19 16:35:56

    apa dissertation citation [url="https://help-with-dissertations.com"]cheap dissertation writing services uk[/url] dissertation help ireland statistics

    No.70 | guest | 2022-05-16 22:18:41

    writing service custom dissertation [url="https://help-with-dissertations.com"]dissertation writing tutors[/url] finance dissertation writing help

    No.69 | guest | 2022-05-15 23:01:50

    masters dissertation writing help [url="https://helpon-doctoral-dissertations.net"]writing dissertation literature review[/url] dissertation writing course

    No.68 | guest | 2022-05-15 05:09:49

    dissertation help service my [url="https://dissertationwriting-service.com"]how long is a dissertation defense[/url] find a dissertation

    No.67 | guest | 2022-05-14 05:49:00

    dissertation help by phd experts [url="https://dissertations-writing.org"]dissertation editor[/url] what's a dissertation

    No.66 | guest | 2022-02-18 18:59:28

    cheap essay writing service [url="https://yoursuperessay.com/"]words to use in an essay[/url] informational essay format

    No.65 | guest | 2022-02-17 17:26:32

    vpn buy account [url="https://windowsvpns.com/"]buy vpn anonymously[/url] private vpn free

    No.64 | guest | 2022-02-16 16:52:39

    how to buy a vpn [url="https://vpnsrank.com/"]pia vpn download[/url] buy vpn service

    No.63 | guest | 2022-02-15 19:14:36

    cloud vpn free and unlimited [url="https://vpnshroud.com/"]free vpn for windows 10[/url] hola vpn

    No.62 | guest | 2022-02-14 21:35:14

    should i buy a vpn [url="https://vpn4torrents.com/"]vpn reviews cnet[/url] best free computer vpn

    No.61 | guest | 2022-02-13 23:00:00

    critical thinking skills [url="https://uncriticalthinking.com/"]critical thinking problem solving[/url] critical thinking org

    No.60 | guest | 2022-02-13 16:47:33

    Bravo, what phrase..., a brilliant idea http://19.downloadfirstyou.com/

    No.59 | guest | 2022-02-12 23:22:11

    cnet vpn [url="https://topvpndeals.net/"]vpn vanish[/url] hotspot shield free vpn

    No.58 | guest | 2022-02-12 00:27:15

    essay writter [url="https://topessayswriter.com/"]how many words in an essay[/url] this i believe essay

    No.57 | guest | 2022-02-11 01:44:23

    hola vpn chrome [url="https://tjvpn.net/"]free desktop vpn[/url] top vpn rated services

    No.56 | guest | 2022-02-10 03:20:52

    vpn protection [url="https://thebestvpnpro.com/"]virtual shield vpn[/url] best vpn for pc

    No.55 | guest | 2022-02-09 05:07:59

    how to delete surge gay dating profile [url="https://speedgaydate.com/"]gay dating sims[/url] free gay sex dating

    No.54 | guest | 2022-02-04 16:59:55

    online casino signup bonus no deposit [url="https://onlinecasinohero.com/"]casino real money[/url] online casino sign up bonuses

    No.53 | guest | 2022-02-03 19:39:30

    keto diet benefits [url="https://ketogenicdiets.net/"]keto diet bacon[/url] keto diet

    No.52 | guest | 2022-02-02 22:29:25

    alcohol keto diet [url="https://ketogenicdietinfo.com/"]keto diet ratio[/url] is diet soda keto

    No.51 | guest | 2022-02-02 00:51:11

    keto diet flour [url="https://ketogendiets.com/"]keto diet carb intake[/url] keto diet benefits

    No.50 | guest | 2022-02-01 03:18:50

    keto diet for men [url="https://ketogendiet.net/"]keto diet shark tank[/url] keto diet foods list

    No.49 | guest | 2022-01-31 06:15:31

    writing a college essay [url="https://howtowriteessaytips.com/"]cause and effect essay topics[/url] college essay prompts

    No.48 | guest | 2022-01-30 08:47:21

    what does the diamond emoji mean in gay chat [url="https://gaytgpost.com/"]chat avenue gay chat room[/url] free gay mens chat phone

    No.47 | guest | 2022-01-29 13:34:08

    gay emo dating [url="https://gaysugardaddydatingsites.com/"]adam for adam gay online dating hookups[/url] gay bisexual senior dating

    No.46 | guest | 2022-01-28 21:30:26

    dating transwoman gay [url="https://gayprideusa.com/"]cruise gay dating[/url] the gay dating shows

    No.45 | guest | 2022-01-28 05:04:45

    free gay dating skwerts [url="https://gaypridee.com/"]gay sex dating[/url] adam for adam gay online dating

    No.44 | guest | 2022-01-27 12:24:17

    chubby gay mens dating sites <a href=https://gayfade.com/>gay tiny micro dick dating</a> squirt gay dating cruising and sex site

    No.43 | guest | 2022-01-26 15:45:46

    free gay chat fcn <a href=https://gay-buddies.com>gay male cam chat</a> chat en vivo gay

    No.42 | guest | 2022-01-25 17:25:06

    essay typer unblocked <a href=https://essaysitesreviews.com>what is a topic sentence in an essay</a> how to cite mla in an essay

    No.41 | guest | 2022-01-24 18:53:57

    an argumentative essay <a href=https://essayscratch.com>grammarly essay check</a> introduction essay paragraph

    No.40 | guest | 2022-01-23 20:50:40

    ati critical thinking <a href=https://criticalthinkinginstitute.com>the foundation for critical thinking</a> critical thinking lesson plan

    No.39 | guest | 2022-01-22 22:46:46

    critical thinking theorists <a href=https://criticalthinkingbasics.com>critical thinking philosophy</a> critical thinking quizlet

    No.38 | guest | 2022-01-22 00:46:32

    analytical vs critical thinking <a href=https://criticalthinking2020.net>critical thinking includes</a> critical thinking scenarios for nurses examples

    No.37 | guest | 2022-01-21 03:17:56

    best vpn for torrenting <a href=https://choosevpn.net>vpn pc free</a> best vpn for hulu

    No.36 | guest | 2022-01-20 03:06:38

    gay sc chat <a href=https://bjsgaychatroom.info>gay chat phone numbers</a> zoom chat rooms gay chat

    No.35 | guest | 2022-01-19 06:11:48

    critical analysis essay example <a href=https://anenglishessay.com>how to start a college application essay</a> essay about yourself example

    No.34 | guest | 2022-01-18 06:32:30

    whats a vpn <a href=https://addonsvpn.com>free avast vpn license key</a> free vpn chrome extension

    No.33 | guest | 2022-01-01 08:59:14

    where can i buy an essay <a href=https://essaytodo.com/?>writing essays for money</a> expository essay writing

    No.32 | guest | 2021-12-30 07:09:56

    reflection essay on writing <a href=https://dollaressays.com/?>scholarship essay examples</a> dna analysis essay

    No.31 | guest | 2021-12-28 08:14:54

    best custom essay writing service <a href=https://essayprepworkshop.com/?>essay revelation o connor</a> apa format sample essay

    No.30 | guest | 2021-12-27 01:34:16

    writing expository essay <a href=https://checkyouressay.com/?>what are the essay types</a> writing college essays for money

    No.29 | guest | 2021-12-23 03:33:06

    writing literary analysis essay <a href=https://casinogamesmachines.com/?>write an essay online</a> writing college essays for money

    No.28 | guest | 2021-12-22 04:15:31

    easy essay writing <a href=https://casinoonlinek.com/?>writing an analytical essay</a> write a reflection essay

    No.27 | guest | 2021-12-21 03:17:19

    write essay online <a href=https://onlinecasinoad.com/?>help writing essays</a> write college essays

    No.26 | guest | 2021-12-20 06:04:59

    writing numbers in essays <a href=https://casinoonlinet.com/?>esl essay writing</a> essay paper writing service

    No.25 | guest | 2021-12-19 07:16:37

    essay paper writing service <a href=https://multiessay.com/?>professional essay writing service</a> academic essay writing

    No.24 | guest | 2021-12-17 10:41:37

    write an expository essay <a href=https://student-essay.com/?>writing a persuasive essay</a> writing an expository essay

    No.23 | guest | 2021-12-16 04:03:27

    help with essay writing <a href=https://buy1essay.com/?>website to write essays</a> creative writing essays

    No.22 | guest | 2021-12-15 02:44:19

    xxx stripping sex games <a href=https://sexygamess.com/?>mature tv sex show games</a> beauty and the beast real story sex games

    No.21 | guest | 2021-12-14 06:08:09

    eroge! sex & game make sexy games <a href=https://sexgameszone.com/?>tv sex games</a> sex mmo games

    No.20 | guest | 2021-12-13 08:30:57

    slave sex games <a href=https://sex4games.com/?>shark sex games</a> black sex games

    No.19 | guest | 2021-12-11 22:02:43

    forced sex games <a href=https://winsexgames.com/?>ghost sex games</a> sex videos teenagers games and hot sex

    No.18 | guest | 2021-12-11 02:17:31

    japan sex games <a href=https://sexygamess.com/?>virtual sex games</a> free sex games make you cum 2 times in five min

    No.17 | guest | 2021-12-06 03:15:12

    are chickpeas keto <a href=https://ketogendiet.net/?>keto breakfast</a> keto salad recipes

    No.16 | guest | 2021-12-05 05:40:03

    keto no bake cookies <a href=https://ketogendiets.com/?>is watermelon keto</a> keto diet vs paleo

    No.15 | guest | 2021-12-04 04:17:32

    pov sex games <a href=https://sexgamesx.net/?>ino mobile sex games</a> teenage sex games

    No.14 | guest | 2021-11-28 00:50:19

    games of thrines sex scences <a href=https://sex4games.com/?>games of sex</a> brother and sister play sex games

    No.13 | guest | 2021-11-25 13:26:44

    hot sex games in dorm <a href=https://cybersexgames.net/?>adults only sex games</a> dangerous sex games

    No.12 | guest | 2021-11-10 22:58:00

    no essay scholarships <a href=https://checkyouressay.com/?>self-evaluation sample essay</a> 5 paragraph essay example

    No.11 | guest | 2021-11-03 18:08:55

    writing an analysis essay <a href=https://student-essay.com/?>write me an essay</a> when writing an essay

    No.10 | guest | 2021-10-13 16:26:56

    paper writing service reviews <a href=https://essaypoints.com/?>affordable editing services</a>

    No.9 | guest | 2021-10-09 16:17:35

    writing college papers <a href=https://essayghostwriter.com/?>order essay</a>

    No.8 | guest | 2021-09-14 03:29:05

    gay pig dating real gay dating sites free <a href=http://gaydatinglosangeles.com/?>gay lesbian dating service</a>

    No.7 | guest | 2021-09-09 08:49:10

    thai gay dating site local gay teen dating webistie <a href=http://datinggayservices.com?>reddit gay friends dating</a>

    No.6 | guest | 2021-09-04 08:20:22

    gay dating in edmonton 100 free gay online dating <a href=http://gaychatgay.com?>muscle gay dating</a>

    No.5 | guest | 2021-08-16 04:05:27

    gay dating profiles most popular gay dating <a href=http://gaychatus.com?>gay dating tv show</a>

    No.4 | guest | 2021-08-13 06:08:46

    senior gay dating sex good gay dating websites <a href=http://gaychatgay.com?>best gay dating site iphone</a>

    No.3 | guest | 2021-08-09 04:14:59

    craig woyak gay dating gay dating forums <a href=http://gaydatingzz.com?>ai gay dating</a>

    No.2 | guest | 2021-07-28 06:04:28

    free online dating sites <a href=http://datingsitesfirst.com/?>dating advice</a>

    No.1 | guest | 2019-10-15 04:44:39

    Search engine optimization differs from the others for everyone. Particularly woth all the bull thatt seems to get floating around in IM forums, bloigs and websites. Bfore yoou hire, check writing specimens. http://gofacucapyji.mihanblog.com/post/comment/new/15/fromtype/postone/fid/1503499757599d95ed66de4/atrty/1503499757/avrvy/0/key/0533af473c680ddfd0c3479f65801bbd/