diff --git a/app.py b/app.py index f9d3943..a5dffe5 100644 --- a/app.py +++ b/app.py @@ -246,8 +246,8 @@ def create_app(config=Config): { "$lookup": { "from": "users", - "localField": "_id", - "foreignField": "_id", + "localField": "added_by", + "foreignField": "added_by", "as": "user_info" } }, @@ -263,14 +263,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 5182ef4..6708dd9 100644 --- a/static/styles.css +++ b/static/styles.css @@ -44,6 +44,14 @@ div.leaflet-popup-content { } +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 6d43849..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/{{current_user.referral_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' %} -