Anders (izzno / gooood) 🇳🇴
As we know "assume makes an ASS out of U and ME"
Rajjix
idk how helpful this might be, but to not query the database for every request, you can query all the data in a list on the first request and filter data out of that list, for concurring data requests. i don’t know if this tends to be efficient when a lot of data is available
Luis
I had no idea the object tools in django where "smart" ... :)
Also you can enable DJango logging and set log level to debug
Anders (izzno / gooood) 🇳🇴
Also you can enable DJango logging and set log level to debug
That might be easier, does it spit out the log in the terminal?
Luis
That might be easier, does it spit out the log in the terminal?
You can set log output to terminal or just a log file
Anders (izzno / gooood) 🇳🇴
You can set log output to terminal or just a log file
The more the welcome during development... Ill see
Luis
docs.djangoproject.com/en/2.1/topics/logging
Luis
@izznogooood
Luis
Django creates a logger called django
Anders (izzno / gooood) 🇳🇴
I can see, thats more complex than i need atm
Luis
Oooh ok. I think it is a simple and quick method to debug what Django is doing without 3rd party tools
Anders (izzno / gooood) 🇳🇴
Oooh ok. I think it is a simple and quick method to debug what Django is doing without 3rd party tools
Your right, and i wrote it down for later hehe. But atm it falls under the "nice to have" category and the debug-tool seemed to have other nicities. But logging is on the map for later.
Anders (izzno / gooood) 🇳🇴
Its the race before the Demo time...
Luis
Oooh! I know you're feeling haha
££££
Please can anyone give me any documentation on Djanjo
££££
I'm just a beginner in python
cj
Please can anyone give me any documentation on Djanjo
https://www.djangoproject.com/start/
cj
I'm just a beginner in python
https://www.python.org/doc/
££££
Tnx man
Anders (izzno / gooood) 🇳🇴
Oh My God, dango debug toolbar ....
Anders (izzno / gooood) 🇳🇴
Please can anyone give me any documentation on Djanjo
https://www.youtube.com/user/schafer5
Anonymous
i need django for beginners book
Anonymous
anyone has django for beginners book auther william s vincent .......then please send .....
Anonymous
yaa right sir but .....if possible
Anders (izzno / gooood) 🇳🇴
Ajmal
Hi I'm Ajmal ,currently trying to expand my skills in django. Now I need help to fix the trouble in django project deployment . I deployed the app using nginx and gunicorn. https://kutt.it/ciHskE I deployed the project , But I'm not able access apps in the project i.e myproject.com/app1 is not accessible while myproject.com is accessible. While accessing app1, nginx return a 403 forbidden error . From the last Stackoverflow answer I got the access to myproject.com/admin/. I tested the project locally , Which is running successful , I can able to access localhost:portnum/app1 So anyone who used to deploy a django project using nginx and gunicorn , Please give try to fix my problem. Thank You
Anders (izzno / gooood) 🇳🇴
Is there a |filter for CamelCase or should i just make my owm ?
cj
Is there a |filter for CamelCase or should i just make my owm ?
🤔 you have capfirst, lower and upper, I don't know if there's one for CamelCase https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#upper
Anders (izzno / gooood) 🇳🇴
cap first will do in this case ;) as "users" have one name
Anders (izzno / gooood) 🇳🇴
strange name, i was looking in that page.
Anders (izzno / gooood) 🇳🇴
Oh, and thanks ;)
Danil
Hi there guys. Have some troubles with backends. After creating a super user just cant log into admin panel
Danil
https://gist.github.com/yungcatx/26cb7af07d54ed0c9103f75a8d54b2c3
Danil
here's the code
Maz
Any pointers on adding a subscription to a django site? Like based on pricing, available features, etc?
Anonymous
hello can help me ? i loaded static files but i've 304 alert in consolle. In the browser i dont see nothing
Anonymous
yes, i now i ve
Anonymous
[19/Nov/2018 20:23:42] "GET /static/css/bootstrap.css HTTP/1.1" 200 157798 [19/Nov/2018 20:23:42] "GET /static/css/fonts.css HTTP/1.1" 200 122543 [19/Nov/2018 20:23:42] "GET /static/js/script.js HTTP/1.1" 200 51808
Rajjix
it’s using cached styles
Anonymous
no, nothing
Anonymous
i disable cache
Danil
Do you have any error?
no, but i've figured out that i have to define create_user method in manager
Danil
and now my admin is working
Danil
but i still can't authenticate in views
Anonymous
but i see all white in browser
Danil
only with email
Danil
yeah
George
but i see all white in browser
Maybe your js is wrong (?)
Rajjix
Any pointers on adding a subscription to a django site? Like based on pricing, available features, etc?
let me know if you find something about that i have it on my list for me near coming project 🤓
Anonymous
Maybe your js is wrong (?)
without django its ok ....
George
without django its ok ....
Make sure you put the link in the template correctly apart from loading static.
George
I dont know :/
Anonymous
<!DOCTYPE html> {% load static %}
Anonymous
<link rel="stylesheet" href="{% static 'css/style.css' %}">
R
let me know if you find something about that i have it on my list for me near coming project 🤓
The guy from simpleisbetterthancomplex has a django project for that in his personal github
Anonymous
in settings.py
Anonymous
STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static') ]
George
<link rel="stylesheet" href="{% static 'css/style.css' %}">
Yes, i guess, check they are available in the urls
R
i’ll check it out when time is due, thanks
https://github.com/vitorfs/colossus/blob/master/README.md
Danil
so now it's working but i still can't login in via view
Danil
should i post my view and form?
Rajjix
aren’t you using the builtin login view? 🧐
Rajjix
import loginview and your basically done, just override the template
Danil
https://gist.github.com/yungcatx/16f6c02679d4e8ea0b86970c08ececdb
Rajjix
that’s an overkill in my opinion
Rajjix
U don’t even need a login form
Rajjix
in your urls
Anonymous
django manages to manage minify files?
Rajjix
From django.contrib.auth.views import LoginView