inchidi
Looks like django-hitcount is for simple django views
if you're using django >2 https://docs.djangoproject.com/en/2.2/ref/signals/#request-started
inchidi
It does hit database on every request
if not then where you want to store the data? cache?
Gaurav
https://pastebin.com/j6W5dgNr
Gaurav
UnboundLocalError at /register/ local variable 'form' referenced before assignment
Михаил
You see I'm looking for solution which will allow me to count hits only for specific model
Михаил
Without bots
Gaurav
https://pastebin.com/j6W5dgNr
i am having error, in the registration page
Михаил
Only user views
venkatesh
getting issue when i migrate to change countries to country like django.db.utils.OperationalError: (1091, "Can't DROP COLUMN countries; check that it exists")
Михаил
For specific model
inchidi
https://pastebin.com/j6W5dgNr
because the request.method not equals with 'POST'
inchidi
it is.... how can you be so sure?
because you only define form when its POST
Nitesh
https://pastebin.com/j6W5dgNr
Check in line 15, you are rendering form but not defined for it.
Gaurav
Check in line 15, you are rendering form but not defined for it.
ohh yeah... you're right.... can you help me fixing this?
inchidi
what do you want to do with those models?
Nitesh
ohh yeah... you're right.... can you help me fixing this?
Check the else block you're using in line 13
Nitesh
It should be with first if
Gaurav
It should be with first if
yes.... It worked!! thank you mate!
Doragonsureiyā
you have the tutorial
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Pk
tinymce image insertion tool not browse image only show three field source , dimension ... please give a solution
carson
Guys I posted this yesterday but I still haven't been able to correct the mistake here.please help me out. Form not rendering. http://dpaste.com/15N7EYC
carson
The form is not rendering but the other HTML is rendered .. It does throw any exception
carson
It still doesn't work after several attempts
Pk
image insertion in django tinymce not working
Jason
Anyone have done friends recommendations in django..?? Please help.
Anonymous
I have successfully made the user must first confirm from his gmail account, from the tutorial https://medium.com/@frfahim/django-registration-with-confirmation-email-bb5da011e4ef But it turns out it only works on a local course, when I upload a project to hosting pythonanywhere he has problems when sending an email, please help my friends so that emails can still be sent so that users confirm first
Anonymous
this is the error SMTPAuthenticationError at /account/signup (534, b'5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv\n5.7.14 WKqshDXmvU9M2ThEqPM8b0xqzUVZMNydPQ3gIdN9D4yBHWQuudSEApwesJ7og23s_JYAJ\n5.7.14 d6B_K-saw1osQkWF_OSvcKSxuapWN5m8dLvjgHpx1yHmliToNvfhitHRBH-6MOaL>\n5.7.14 Please log in via your web browser and then try again.\n5.7.14 Learn more at\n5.7.14 https://support.google.com/mail/answer/78754 t29sm2176319qkm.27 - gsmtp')
Anonymous
I my case i have enabled it. Even then i still get the same smtp error. I am using Django 3.0. My project is deployed in Heroku (free).
Das
Which I the best ide for Django
Anonymous
I am having the same problem too. Have you tried enabling Google's two factor authentication and then creating an app password?
sorry I do not understand, how to do it, so I can try it and if successful I will tell you
a.mashkurov
hi everyone i'm starting to learn django what training materials advise for me?
Viktor🔮
New member? then you've been muted for 5 minutes to read the rules properly before doing anything, please don't PM anyone asking why you were muted! By joining this group, you agree with the Django Code of Conduct Here are some resources to start with django if you're Iranian, you are globally restricted, we can't do anything about it, sorry.
Doragonsureiyā
hi everyone i'm starting to learn django what training materials advise for me?
Check out PythonRes, a channel for Python resources (links to help you out).
a.mashkurov
Thanks
Das
Thanka
Gaurav
can somebody help me fixing 404, 500 errors..... how to custom handlers in django 2+
Gaurav
https://pastebin.com/PayJQabR
Gaurav
use crispy-forms
Anonymous
sorry I do not understand, how to do it, so I can try it and if successful I will tell you
Sure, please let me know. I have tried everything in the book. But nothing has worked so far. Not sure what the problem is. Just curious, what settings have you used to get it to work with dev server? Sending emails doesn't work even with dev server for me.
Gaurav
degub is false and allowed host is localhost, i am getting 400 error why is that?
Anonymous
degub is false and allowed host is localhost, i am getting 400 error why is that?
Hope you have added localhost in quotes to ALLOWED_HOSTS.
Gaurav
but all i am getting is bad request.....
Gaurav
i dont know why
Gaurav
ans is given in the documentation but i didnt understand ..... documnetation says : If the Host header (or X-Forwarded-Host if USE_X_FORWARDED_HOST is enabled) does not match any value in this list, the django.http.HttpRequest.get_host() method will raise SuspiciousOperation.
Gaurav
https://docs.djangoproject.com/en/3.0/ref/settings/
Gaurav
thanks for the help.... i fixed it
Diego
Does anyone know how can i set 2 types of user (SignUp form) in DRF?
Diego
I've already set one type, usgin djoser token
Григорий
Have anyone tried to use LDAPBacked as authentication and then successfully got data from drf endpoint using user credentials? I'm getting an error providing my ldap user credentials with the request. the error is: 'NoneType' object has no attribute 'strip' it happens in line: ldap_user = _LDAPUser(self, username=username.strip(), request=request)
Anonymous
How to implement live chat support with django website
Anonymous
you can read this is https://medium.com/@frfahim/django-registration-with-confirmation-email-bb5da011e4ef
I have read that. He uses an older version of Django. There is one module named six which is now deprecated as of Django 3.0.
Anonymous
means you can't use gmail confirmation even on your localhost?
I have worked around it. But i am getting similar error as you when i try to send email. I dont know where the error is. Everything works fine if i use console back end
Anonymous
I have worked around it. But i am getting similar error as you when i try to send email. I dont know where the error is. Everything works fine if i use console back end
Has the problem been resolved? I already, it turns out that it's quite easy to do not use a gmail account that has been used before on EMAIL_HOST_USER, because when on localhost I use the same email in the project that I uploaded on the hosting, and that's not allowed
Anonymous
I have worked around it. But i am getting similar error as you when i try to send email. I dont know where the error is. Everything works fine if i use console back end
oh yeah don't forget to edit acc_active_email.html, change the protocol to https if you also use the https protocol in pythonanywhere
Anonymous
What version of django you use? 1.11 2.22 3.0.1
Anonymous
I have created a gmail id specific for my project. All email triggers need to be sent using that gmail id. If i cannot use that, how do i go about sending emails in django?
Anonymous
Why shouldn't we use the same email? Which email do we use then?
how about an error in your project, please copy here