Giter Club home page Giter Club logo

django-tctip's Introduction

django-tctip

一个 Django 应用,用来在页面显示打赏弹框,效果可看我博客 https://tendcode.com/

step 1 安裝包

pip install django-tctip

step 2 配置中添加应用

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_tctip',
]

step 3 生成数据表

python manage.py makemigrations
python manage.py migrate

step 4 在需要展示的页面添加引入标签函数{% load tctip_tags %},并添加标签函数{% load_tctip %}到html中,建议放在head标签末尾

{% load tctip_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="referrer" content="origin">
    <title>Title</title>
    {% load_tctip %}
</head>
<body>
<div>django-tctip demo test !!!</div>
</body>
</html>

step 5 前往管理界面添加数据即可显示到前台(参数都是可以通过后台配置的,参数的作用可以查看前台注释中描述,比较简单故不做说明)

说明:django-tctip 是将tctip项目封装成了django的应用,感谢原项目 https://github.com/greedying/tctip 作者和删减版 https://github.com/HaddyYang/tctip 作者

django-tctip's People

Contributors

hopetree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

django-tctip's Issues

新增icon

  1. 删除model中了解更多的描述和链接,js中默认即可
  2. 增加微信群的icon自添加
  3. 修改admin排序,把flag单独放在第一行,同时删除已经移除的字段

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.