Anders (izzno / gooood) 🇳🇴
dump/copy your db
Anders (izzno / gooood) 🇳🇴
Mirco
Anders (izzno / gooood) 🇳🇴
Mirco
Yw 💪🏻
Naveen
Ok thanks i Will continue looking
https://simpleit.rocks/python/django/dynamic-add-form-with-add-button-in-django-modelformset-template/
Anders (izzno / gooood) 🇳🇴
Yw 💪🏻
I cant find documentation for the sender= attribute, can i give it a list?
Anders (izzno / gooood) 🇳🇴
djesus... "for the @ reciever decorator"
Anders (izzno / gooood) 🇳🇴
looking through the code it seems like you can give a list to the decorator it self... @ reciever([(post_save, sender=User), (post_save, sender=User)])
Anders (izzno / gooood) 🇳🇴
or something like that.... Il try tomorrow hehe.
Anders (izzno / gooood) 🇳🇴
Category.published.filter(items__in=pub_items) Item has a manyToMany relationship with Category. Why is this returning the same category twice? I have two items with the same category, what i want is a list (queryset) of categories for the items i supply but not the same category twice? I use a set to get rid of that now but there's got to be a "correct" way ?
Anders (izzno / gooood) 🇳🇴
published is just my own manager, pub_items is a list of items required from another query
Shailesh Kumar
hello everyone,
Shailesh Kumar
I need help for How to customize django admin panel. can i redesign it?
Shailesh Kumar
yes you can
Can you please suggest me how I can able to do this. Because I am new in this. If any reference is available, please provide here
cj
Django jet
be careful with its license 🙂
Shailesh Kumar
Okay
Naveen
distinct() ?
👍
Martin
@c0x6A figured my issue out yesterday, it was pretty stupid. https://i.imgur.com/2ZUGx2Z.png
cj
@c0x6A figured my issue out yesterday, it was pretty stupid. https://i.imgur.com/2ZUGx2Z.png
I had something similar in mind, as you do too... nice you solved it
Martin
I had something similar in mind, as you do too... nice you solved it
Yeah, fixed like 5 other issues and managed to upgrade to Python 3 and latest Django, now just fighting encoding changes from P2->P3
Mirco
study as better as you can python and how web works 😊
Mirco
wow you already are a py/django expert ?
An_eeZ
👍👍👍
Happy
I am using that, I asked about socketio, that's another implementation (of WebSockets) flask has a package.
pip search django-websocket django-gevent-websocket (0.1.0) - Easy WebSocket server for django using gevent-websocket ....
Happy
learn database design
Anders (izzno / gooood) 🇳🇴
distinct() ?
Yepp :) Thanks.
Anders (izzno / gooood) 🇳🇴
wesocckets
Anders (izzno / gooood) 🇳🇴
Available in django channels.
Anders (izzno / gooood) 🇳🇴
Not to be confused with socketIO which is a library based on websockets.
Anders (izzno / gooood) 🇳🇴
wesocckets
With websockets and a litle bit of javascript your apps become much more dynamic.
Anders (izzno / gooood) 🇳🇴
Not to mention handling of real time events.
Almaz
Hi, there! Does anyone have an example of jenkins pipeline, that builds and runs dockerized django project?
Anders (izzno / gooood) 🇳🇴
I think you can apply the same principle as jenkins runs like a shell runner.
Anders (izzno / gooood) 🇳🇴
What will you use to deploy? Socker regestry or docker-compose? (swarm)
Almaz
docker-compose
Mirco
Almaz
I think you can apply the same principle as jenkins runs like a shell runner.
yeah, I know, I already could build and run, but I don't know, is that a right practice
Anders (izzno / gooood) 🇳🇴
https://pastebin.com/Shwtgw2K
Anders (izzno / gooood) 🇳🇴
I use different docker-compose.yml for testing, dev, stage (master not done)
Anders (izzno / gooood) 🇳🇴
I also use different entrypoints (bash scripts)
Anders (izzno / gooood) 🇳🇴
with ci/cd its important to remeber that if you run three commands and the last does not fail your pipeline succeeds, you dont want that, so you need to make sure to exit the script with the correct (or fail) code. https://pastebin.com/G6s2ZZHD
Anders (izzno / gooood) 🇳🇴
(My example is missing a production stage, because im not out of beta yet :))
Anders (izzno / gooood) 🇳🇴
(One last input, gitlab/jenkins are both resource hungry, but gitlab may be a steeper learningcurve but it allows for more privecy, and is very customizable). Django is a tiny bit more pain to set up in CI/CD becouse you need to create all the different stages your self.
Sirius
Hello everybody! After command "migrate" it's giving me this error: Migration admin.0001_initial is applied before its dependency accounts.0001.initial on database 'default'.
Toni
I am new to django, can anyone suggest best tutorial to learn django?
Anonymous
I want to develop website with Django can anyone help me
Anonymous
Or anyone have documents how to use and develop django
Naveen
go to the folder where manage.py is you will find database files there
Naveen
there would be a file named db.sqlite3 just delete it and migrate again
Naveen
I am new to django, can anyone suggest best tutorial to learn django?
There is a course named Django basics on udemy. It is the best one can get as a beginner. P.s. You can download it offline through resources :p
Toni
I would suggest newboston YouTube videos
I have checked them, he is using django 1.x something but my project requires 2.x
Vladimir
When is CORS needed and how does it work in the browser?
Dmitrii
When is CORS needed and how does it work in the browser?
This is about a situation when your client app (SPA for ex) and a server are on different domains. By default this type of requests is restricted.
Martin
I'm trying to get some debug instructions by the previous guy working but they appear to be incomplete. from manager.backend import * ldap = LDAPBackend() ldap.get_server_list() However I get told off because variables from settings.py are not set for some reason. django.core.exceptions.ImproperlyConfigured: Requested setting LDAP_SEARCH_SERVERLIST, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. Running settings.configure() works but re-executing ldap.get_server_list() again doesn't AttributeError: 'module' object has no attribute 'LDAP_SEARCH_SERVERLIST' Could someone tell me what I'm possibly doing wrong?
Martin
This is an old Django instance and Python 2, but I get the exact same issue albeit worded a bit differently on 2.2.3 and python 3 AttributeError: module 'django.conf.global_settings' has no attribute 'LDAP_SEARCH_SERVERLIST'
أمجد☄
so i have installed django suit from their documentation as instructed but when i load their theme its not loading the style https://i.stack.imgur.com/04SUt.png any one knows how can i fix it or even a recommendation of a better theme would be accepted
أمجد☄
This is an old Django instance and Python 2, but I get the exact same issue albeit worded a bit differently on 2.2.3 and python 3 AttributeError: module 'django.conf.global_settings' has no attribute 'LDAP_SEARCH_SERVERLIST'
wow, so i switched to firefox and it looks that its working fine in there, and then i thought that its a cache problem and it really is, cleared it on my chrome browser and its working perfectly, thank you.
godmode
how it's supposed that every time i type an url that is not real another diferent page than the 404 is deployed?
godmode
i didn't use get_page_or_404
Albert
Hello. Can anyone come across this? Trying to get email sent to admins on server errors. my settings.py: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'file': { 'level': 'ERROR', 'class': 'logging.FileHandler', 'filename': 'debug.log', 'formatter': 'simple' }, 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', 'formatter': 'simple' }, }, 'loggers': { 'django': { 'handlers': ['file', 'mail_admins'], 'level': 'ERROR', 'propagate': True, }, }, } With 500 errors, letters do not arrive, but logs are written to the file. Separately, I checked sending email through the console - everything is in order, I receive letters: send_mail('Subject here', 'Here is the message.', EMAIL_HOST_USER, ADMINS, fail_silently=False) I tried debug = True and False
Anonymous
How to set otp system in django website