These are chat archives for django/django

1st
Feb 2018
nh916
@nh916
Feb 01 2018 03:19
yes i am working with form
i used the usercreation form and i took out the username field
CACppuccino
@CACppuccino
Feb 01 2018 03:22
well what about just accept the email in username and do some limitations in the frontend with js
@nh916
nh916
@nh916
Feb 01 2018 03:46
that works but its not the best. In the short term thatll work but in the long term thats just bad data handling
if i can get it to work well from the start then thatll be the best
you get what im saying
CACppuccino
@CACppuccino
Feb 01 2018 04:21
In long term, i would suggest you customise the user system instead of using the provided one. And i reckon email would be one of the ways registering the account if your website grows, so why do you think this is a bad data handling?
nh916
@nh916
Feb 01 2018 04:24
how can i make a custom one instead
i heard there were ways in which you could make a custom model and I was looking into it. I made a custom model and I put it at the end of the settings

AUTH_USER_MODEL = 'Users.UserProfile'

for some reason it still will not use my model

what am i doing wrong?

nh916
@nh916
Feb 01 2018 04:30
i have looked through that a bunch of times and I couldnt find the answer
ill look through it again though
the model that i have made is in my admin panel but the tables for some reasons dont show. it just shows that i can add users
and thats it. it doesnt show me each column with the header of email or password at the top
i just want to get the program to use my database instead of the one that it uses by default
:]
@elcolie
Feb 01 2018 10:47
I have a Facebook webhook problem.
Are there any body here has experience on whitelist?
Sanjeev Sharma
@thesanjeevsharma
Feb 01 2018 16:02
{% for customer in customers %}
<tr>
<td>{{ customer.info.name }}</td>
<td>{{ customer.info.cluster }}</td>
<td>{{ customer.info.phone }}</td>
<td>{{ customer.info.whatsapp }}</td>
<td><a href="{% url 'customerProfile' customer.info.name %}"></a></td>
</tr>
{% endfor %}
In the last 'table data' I want to add a link that passes the current users name to views.py
Is this the right way? If yes, then how should I access it in the 'views.py' file? If no, then how should I do it?
HELP!
Roel
@roelzkie15
Feb 01 2018 23:22
@thesanjeevsharma you can take a look at this how to access user data in a django template and as well you can use forloop.last expression to place the user info at the last record as a request to your desired view.
anyway you can just simply access the user data in a view just like this https://stackoverflow.com/a/25573626/6143656