Results 1 to 2 of 2

Thread: Any way to use Django template inheritance with ExtJS?

  1. #1
    Touch Premium Member
    Join Date
    Apr 2011
    Location
    Ottawa, Canada
    Posts
    22
    Answers
    1
    Vote Rating
    0
      0  

    Default Any way to use Django template inheritance with ExtJS?

    It looks like ExtJS doesn't support declarative markup, which, using Dojo as an example would be:

    Code:
    <div data-dojo-type="demo/SomeWidget"
    Code:
            data-dojo-props="title: 'Our Some Widget'">
        <p>This is arbitrary content!</p>
        <p>More arbitrary content!</p>
    </div>
    
    I'm using Django for my server side logic and I use its template inheritance extensively. I was hoping to use ExtJS's Viewport with north/center/west regions to create a two column base template with a header bar to replace my two_column.html base template I currently have. But this won't be possible by the looks of it. Is there any way to continue using Django's template inheritance or do I need to add code to every single page to instantiate my two column Viewport?

  2. #2
    Touch Premium Member
    Join Date
    Apr 2011
    Location
    Ottawa, Canada
    Posts
    22
    Answers
    1
    Vote Rating
    0
      0  

    Default

    To clarify this further:

    A base template in Django looks like this:

    Code:
    <html>
    <head>
    	<title>Test</title>
    
    
        <link rel="stylesheet" type="text/css" href="/static/extern/extjs/resources/css/ext-all.css" />
        <script type="text/javascript" src="/static/extern/extjs/ext-all-debug.js"></script>
    </head>
        {% block content %}
        {% endblock %}
    </html>
    It defines a block that a child template can override:

    Code:
    {% block content %}
    This is my page content.
    {% endblock %}
    Except I want the content block to be located in the Viewport's center region, which seems to be impossible with ExtJS.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •