greyli / catchat Goto Github PK
View Code? Open in Web Editor NEWA chatroom built with Flask, featured with Markdown support and code syntax highlight.
Home Page: http://catchat.helloflask.com
License: MIT License
A chatroom built with Flask, featured with Markdown support and code syntax highlight.
Home Page: http://catchat.helloflask.com
License: MIT License
我去google设置OAuth client id设置应用的主页时,我本来想设置成本地的局域网URL :http://192.168.123.116:5000,还有callback的 URL :http://192.168.123.116:5000/callback/Google, 谷歌提示不能用局域网这类地址,后来又跑去hosts文件设置了xxx.Wggglggg.com,再去谷歌设置两个url时,谷歌又提示要用https://,我用作者的源码127.0.0.1测试时,网址我看了是http的啊,这是如何实现的,并且.flaskenv第三方的怎么都是test
The template being used for /messages page is '_messages.html', which is used as a sub-template in 'home.html' to render a list of messages. However, when used alone on /messages page, no style will be applied.
经过debug 发现
providers[provider_name].authorize(callback=callback_url)
得到的url是可以到认证页面 但视图函数返回报如图错误
????
{% if current_user.is_admin and not user.is_admin %}
<i class="delete icon"></i>
<a class="delete-user-btn" href="#!" data-href="{{ url_for('admin.block_user', user_id=user.id) }}"
onclick="confirm('Are you sure?')">Delete</a>
{% endif %}
//delete_user
$('.delete-user-button').on('click', function () {
var $this = $(this);
$.ajax({
type: 'DELETE',
url: $this.data('href'),
success: function () {
console.log('Success, this user is gone!')
},
error: function () {
console.log('Oops, something was wrong!')
}
});
});
delete-user-btn 修改为delete-user-button后,测试,还是没办法删除用户,后端接受不到delete请求.
将delet-user-button这段js代码内嵌到_profile_card.html里面问题解决了
def hello():
return "Hello World"
总有个,还有tab键不能用
<script type="text/javascript">
var root_url = "{{ url_for('chat.home') }}";
var messages_url = "{{ url_for('chat.get_messages') }}";
var current_user_id = {{ current_user.id|default(0) }};
var csrf_token = "{{ csrf_token() }}";
var current_user_id = {{ current_user.id|default(0) }};这个?????
My message can only receive by one of the front client, not bi-directionally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.