Anonymous
😆
Anonymous
No problem
Thomas
Im worrying that nobody else will understand 😁
Thomas
No problem
Please dont forget about it so I dont need to explain again tomorrow 😅
Anonymous
No, I won't
Thomas
Thank you very much 👍
Django Bot
>> Links - djangosnippets: DRF - Optimizing ModelViewSet queries
Django Bot
>> Links - How to deploy with WSGI | Django documentation | Django - python - Django Setup Default Logging - Stack Overflow - python - manage.py doesn't log to stdout/stderr in Docker on Raspberry Pi -
Django Bot
>> Links - digitapex/LinkBookmarkWebApp: Django web app to save, manage and quickly fi - LinkBookmarkWebApp: Self-hosting bookmark manager built with Django - rochacbruno/dynaconf: The dynamic configurator for your Python Project
Rajat
Why do we basically use Docker ?
Anonymous
Why do we basically use Docker ?
https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b
Rajat
Thank you!
Django Bot
>> Blogs - How To Deploy Django Channels To Production
Thomas
@Sin_atra Hi again. Could you please show me that example of init overide for form fields? Thank you.
Django Bot
>> Links - GitHub - Miserlou/Zappa: Serverless Python - GitHub - graphql-python/graphene-django: Graphene Django integration
Anonymous
what is the best way to setup django settings.py for production, is there like a suggested pattern to follow or anyone can configure it how ever they like?
Django Bot
>> Links - Writing your first Django app, part 2 | Django documentation | Django
ʚɞÇherry Łoveʚɞ
what is the best way to setup django settings.py for production, is there like a suggested pattern to follow or anyone can configure it how ever they like?
I separate 3 configs with development_settings.py, prod_settings.py and test_settings.py. Then set environment variable to get django setting file. with prod_setting.py. i set DEBUG=False, ALLOWED_HOSTS=['*'] and LOGGING config to syslog docker container '
Anonymous
I forgot about that
Anonymous
I'll hopefully post it later today
Thomas
I'll hopefully post it later today
Thank you very much :) I'll be waiting.
Thomas
I'll hopefully post it later today
I made it work :) . Inside a class that inheriting from "forms.Form" in "init" method I add additional variable to field dictionary. It is working right now I have additional variable in template that is dedicated from input field.
Django Bot
>> Blogs - Best Django Books 2018
Django Bot
>> Links - GitHub - iyanuashiri/meethub: This is a Python/Django based event managemen
Django Bot
>> Blogs - Using Braze so that marketers are not the developers’ nightmare - Taming Irreversibility with Feature Flags (in python) >> Links - sthzg.net – Freelance Web Developer - python - Recommended way to find the source of a query when using Django? - - Architect — Architect documentation - Django Class-Based-View Inspector -- Classy CBV
Django Bot
>> Jobs - Software Engineer (Full Time)
Django Bot
>> Links - Working With Wagtail: Menus | Tivix
Anonymous
Share more info about it
Django Bot
>> Links - Creating Dynamic Forms with Django | Caktus Group
Django Bot
>> Blogs - Djangocon: it's not a bug, it's a bias - Anna-Livia Gomart - Djangocon: a different form of navigation - Chaim Kirby - Djangocon: writing code.... evolve it instead - Emma Gordon - Djangocon: building real-time apps with django - Iacopo Spalletti - Djangocon: can packaging improve django deployments? - Markus Zapke-Gründem >> Links - Building Modern Applications with Django and Vue.js - Building Modern Applications with Django and Vue.js
Django Bot
>> Links - Django OAuth Toolkit
Thomas
Hi everyone. It is possible to set in models in ManyToManyField default value? Im using it for template classes and I need one class to be preselected.
inchidi
Hi everyone. It is possible to set in models in ManyToManyField default value? Im using it for template classes and I need one class to be preselected.
you can do that inside save method, get one value related that you desire and handling if no data available too
Thomas
you can do that inside save method, get one value related that you desire and handling if no data available too
Im already solve it by "default=str(Custom_classes.objects.get(classes_value='customforms-inputfield').id)"
inchidi
Im already solve it by "default=str(Custom_classes.objects.get(classes_value='customforms-inputfield').id)"
you can also do something like this if you like def my_cc(): return str(CustomClasses.objects.get(classes_value='customforms-inputfield').id) foofield = models.ManyToManyField(CustomClasses, related_name='cc', default=my_cc)
Thomas
you can also do something like this if you like def my_cc(): return str(CustomClasses.objects.get(classes_value='customforms-inputfield').id) foofield = models.ManyToManyField(CustomClasses, related_name='cc', default=my_cc)
Actually I try this your second advice because right now I try delete that string I provide as parameter from field in admin and after add it again. Right now I dont have default value.
inchidi
Actually I try this your second advice because right now I try delete that string I provide as parameter from field in admin and after add it again. Right now I dont have default value.
if the default value considered by input, then i'll recommend you to handle it with overriding save method. coz if you do this, you will get trouble when accessing your db via django shell ig
Django Bot
>> Links - Django vs SQLAlchemy
Thomas
if the default value considered by input, then i'll recommend you to handle it with overriding save method. coz if you do this, you will get trouble when accessing your db via django shell ig
I solve it by aaa = Custom_classes.objects.filter(classes_value='customforms-inputfield') and if this list is empty (so that value doesnt exist in db) return None, else Im returning this "return str(aaa.values('id')[0]['id'])" .
Thomas
And it is working fine :)
Django Bot
>> Links - django-u2f
DragonMachine
Probably you will get Bun 😉
Django Bot
>> Links - Welcome to Django OAuth Toolkit Documentation — Django OAuth Toolkit 0.12.0 - PDFs in Django: The essential guide — /var/
Anonymous
Hi guys I have login template and render it but Cant connect(load) css and js file and code And i am sorry my telegram descktop didn't login and i most send you my phone photo How can fix it?
Javi
manage.py collectstatic ?
Anonymous
STATICFILES_DIRS
Javi
oh, yep, the lowercase i
Anonymous
And in template {% load staticfiles %}
mλdcodez
Managing static files (e.g. images, JavaScript, CSS) | Django documentation | Django https://docs.djangoproject.com/en/2.0/howto/static-files/
Django Bot
>> Links - Djangocon: making smarter queries with advanced ORM resources - Mariana Bed
Django Bot
>> Links - Tips for Building High-Quality Django Apps at Scale
Anonymous
This will help
Thank you so much
Anonymous
hi guys id do any thing yousaid but didn't load static files
r0b0t
Where have you placed your static files?
ʚɞÇherry Łoveʚɞ
hi guys id do any thing yousaid but didn't load static files
can you change double quote to single at static url.
ʚɞÇherry Łoveʚɞ
ex. href="{% static 'libs/handsontable/dist/handsontable.min.css' %}"
ʚɞÇherry Łoveʚɞ
try to use {% load static %} instead of staticfiles
Anonymous
Anonymous
i will be thank form your help
ʚɞÇherry Łoveʚɞ
i will be thank form your help
typo problem with STATICFiLES_DIR can impact your applications ?
Anonymous
do you want i send my App ?
inchidi
i didn't yor mean
in your settings.py it should be STATICFILES_DIRS not STATICFiLES_DIR
inchidi
the app already restarted?
Anonymous
the app already restarted?
yes sure i restart it
inchidi
try copy STATICFILES_DIRS and find (CTRL+F) in your settings.py
inchidi
try copy directly from here
inchidi
yes if do it with ctrl+f
you wont get match, because its still wrong
inchidi
STATICFILES_DIRS
inchidi
calm down and focus
inchidi
maybe grab some mineral water if you are not fasting, it helps tho