screencast link

This commit is contained in:
rimu 2024-01-22 21:14:40 +13:00
parent edbd854015
commit 1de72f5ab4
3 changed files with 8 additions and 15 deletions

View file

@ -7,12 +7,8 @@ A lemmy/kbin clone written in Python with Flask.
- AGPL. - AGPL.
- First class moderation tools. - First class moderation tools.
[Screencast: overview of the PieFed codebase](https://join.piefed.social/2024/01/22/an-introduction-to-the-piefed-codebase/)
## Project goals ## Project goals
To build a federated discussion and link aggregation platform, similar to Reddit, Lemmy, Mbin. To build a federated discussion and link aggregation platform, similar to Reddit, Lemmy, Mbin.
## Differences from other federated systems
...

View file

@ -31,10 +31,6 @@ def login():
return redirect(url_for('auth.login')) return redirect(url_for('auth.login'))
if not user.check_password(form.password.data): if not user.check_password(form.password.data):
if user.password_hash is None: if user.password_hash is None:
if "@gmail.com" in user.email:
message = Markup(_('Invalid password. Please click the "Login using Google" button or <a href="/auth/reset_password_request">reset your password</a>.'))
flash(message, 'warning')
else:
message = Markup(_('Invalid password. Please <a href="/auth/reset_password_request">reset your password</a>.')) message = Markup(_('Invalid password. Please <a href="/auth/reset_password_request">reset your password</a>.'))
flash(message, 'error') flash(message, 'error')
return redirect(url_for('auth.login')) return redirect(url_for('auth.login'))

View file

@ -135,7 +135,8 @@ def list_topics():
topics = Topic.query.order_by(Topic.name).all() topics = Topic.query.order_by(Topic.name).all()
return render_template('list_topics.html', topics=topics, title=_('Browse by topic'), return render_template('list_topics.html', topics=topics, title=_('Browse by topic'),
low_bandwidth=request.cookies.get('low_bandwidth', '0') == '1', moderating_communities=moderating_communities(current_user.get_id()), low_bandwidth=request.cookies.get('low_bandwidth', '0') == '1',
moderating_communities=moderating_communities(current_user.get_id()),
joined_communities=joined_communities(current_user.get_id())) joined_communities=joined_communities(current_user.get_id()))
@ -222,8 +223,8 @@ def keyboard_shortcuts():
@bp.route('/test') @bp.route('/test')
def test(): def test():
return pytesseract.image_to_string(Image.open('test.png').convert('L'))
return current_app.config['SERVER_NAME']
#ip = request.headers.get('X-Forwarded-For') or request.remote_addr #ip = request.headers.get('X-Forwarded-For') or request.remote_addr
#if ',' in ip: # Remove all but first ip addresses #if ',' in ip: # Remove all but first ip addresses