diff --git a/app.py b/app.py index 182522e..2e34e9b 100644 --- a/app.py +++ b/app.py @@ -256,8 +256,8 @@ def create_app(config=Config): { "$lookup": { "from": "users", - "localField": "_id", - "foreignField": "_id", + "localField": "added_by", + "foreignField": "added_by", "as": "user_info" } }, @@ -273,14 +273,17 @@ def create_app(config=Config): } } ]) - print(leaders) - for leader in leaders: + #print(list(leaders)) + cleaned_leaders=list() + for leader in list(leaders): leader["username"] = leader["username"][0]+"***"+leader["username"][-1] + cleaned_leaders.append(leader) if current_user.is_authenticated: username = user.username else: username = None - return render_template('leaderboard.html', leaders=leaders, username=username) + + return render_template('leaderboard.html', leaders=cleaned_leaders, username=username) return app diff --git a/static/styles.css b/static/styles.css index 5e08bbb..e715fe3 100644 --- a/static/styles.css +++ b/static/styles.css @@ -45,6 +45,14 @@ main { padding-bottom: 6rem; } +div#qrgen img { + padding-left: 0; + padding-right: 0; + margin-left: auto; + margin-right: auto; + display: block; +} + section#pinner-modal { position: absolute; top: 7vh; diff --git a/templates/dashboard.html b/templates/dashboard.html index fd13834..40c470e 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -9,22 +9,25 @@

Hola {{current_user.username}}

-

Aquí puedes ver los pines que has agregado y ver tu enlace/QR de invitación. Cada vez que recargas esta página, tu enlace de invitacón cambia y el anterior se vuelve inválido.

-
+

Aquí puedes ver los pines que has agregado y consultar tu enlace/QR de invitación. Cada vez que recargas esta página, tu enlace de invitacón cambia y el anterior se vuelve inválido.

+
+
+
+ +
+

Tu link es:

+

https://baches.qro.mx/registrame/{{current_user.referral_code}}

+
- -

Tu link es:

-

https://baches.qro.mx/registrame/{{invite_code}}

- {% if pins %} {% for pin in pins %} diff --git a/templates/leaderboard.html b/templates/leaderboard.html index 6d5d33b..5669b70 100644 --- a/templates/leaderboard.html +++ b/templates/leaderboard.html @@ -1,6 +1,19 @@ {% extends 'secondbase.html' %} -