GithubHelp home page GithubHelp logo

brmc / django-octopus Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 0.0 168 KB

A lightweight AJAX pull framework for django.

License: MIT License

Python 49.53% JavaScript 41.81% HTML 7.95% Shell 0.71%

django-octopus's People

Contributors

brmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-octopus's Issues

http://mcclure.pw/demo is a dead link

It says:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

I don't think anyone actually uses this, so unless there are objections I'm going to break backwards-compatibility instead of deprecating a feature

The new change will remove fragment_name and fragment_suffix on the views in favor of base_template and ajax_template. This will eliminate the need for proxy templates and make things cleaner. For example currently, a view might look like this:

SomeView(OctopusDetailView):
    template_name = 'template.html'
    fragment_name = 'fragment.html'
    ...

With the following templates:

base.html

{% block content %}
{% endblock content %}

template.html:

{% extends 'base.html' %}
{% include 'fragment.html' %}

fragment.html

<h1>somethingsomething</h1>

Under the new implementation, the same functionality would be achieved like this:

SomeView(OctopusDetailView):
    template_name = 'template.html'
    base_template = 'base.html'
    ...

With the following templates:

base.html

{% block fragment %}
{% endblock fragment %}

template.html:

{% extends base_template %}

{% block fragment %}
    <h1>somethingsomething</h1>
{% endblock fragment %}

Note that base_template is a context variable in the second template.html, not a string

Any one have any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.