Jimmies San
but inside uwsgi socket = /home/ubuntu/ambiente_er/ambiente_er.sock
Leonardo
is not the same path?
Jimmies San
this module = ambiente_er.wsgi:application exists?
Jimmies San
is not the same path?
mmmh yes you're right
Leonardo
ambiente_er.wsgi is the same ambiente_er/wsgi?
Leonardo
is yes, it's wrong
Leonardo
must be
Jimmies San
and inside wsgi.py what settings are you loading?
Leonardo
/home/ubuntu/ambiente_er/src/ambiente_er/wsgi.py
Jimmies San
ambiente_er.wsgi is the same ambiente_er/wsgi?
uwsgi call wsgi.py, this call the settings
Leonardo
ooh
Leonardo
it's wrong then.
Leonardo
lemme fix it
Jimmies San
i need to do a shower mate, see you later
Leonardo
at 9 i'll out with my family
Leonardo
maybe tomorrow we can mate if you available
Jimmies San
here 02 am :D
Leonardo
what time is there?
Leonardo
i'm in brazil, it's 20:31 here
Jimmies San
01:30 after midnight here
Leonardo
i'm back like 23:00
Leonardo
well, maybe tomorrow then, if you available hit me up on private please
Leonardo
i'll turn on the notifications
Leonardo
thank you very much for your help
Leonardo
sorry about something 😊
Leonardo
uwsgi call wsgi.py, this call the settings
i did not changed anything, just ran uwsgi manually to test first ubuntu@ip-172-31-85-43:~/ambiente_er$ uwsgi --http :8000 --home /home/ubuntu/ambiente_er --chdir /home/ubuntu/ambiente_er/src --module ambiente_er.wsgi
Leonardo
and worked as well, but with not static files
Leonardo
so the module it's ok i think...
Leonardo
cuz on his post, he just paste his project name too and not a path file, so i did the same
Leonardo
here's the log after commandline: https://pastebin.com/T0RT7Uf1
Jimmies San
Rajjix
you can iterate through it no?
Rajjix
🧐
Rajjix
Consider it a dictionary and display desired info accordingly
Rajjix
Or another way just use timezone.now().year , .month, .day when creating those timestamps
Rajjix
Just suggestions of how i would have approached the problem,
Ronald
Or another way just use timezone.now().year , .month, .day when creating those timestamps
cool thanks thats what I was thinking now… But I already have data and I think in the long term it would be benificial to have all the info in the db
George
I have to repeat my question, if anyone knows what could i be doing wrong, please tell me, the documentation is scarce
George
hi, has anyone used django_select2? I am not able to generate a working form, it doesn't query database in any way, the fields appear empty https://pastebin.com/9zR3MwW4
George
Wtf
George
Yes. I did
George
I even used all
Mirco
And your select fields are still empty , right ?
Ronald
you can iterate through it no?
I managed to to get it with visits = Subs.objects.annotate(date=TruncDate('timestamp')).filter(camp=campdata, date__lte=datetime.datetime.today(), date__gt=datetime.datetime.today() - datetime.timedelta(days=30)).values('date').annotate(count=Count('date'))
Ronald
only thing now is to get it serialised so I can use it in a JsonResponse
Ronald
I tried serializers.serialize('json', visits, cls=DjangoJSONEncoder) but no luck
Rajjix
only thing now is to get it serialised so I can use it in a JsonResponse
Can’t help you there haven’t used django serializers before 🤷‍♂️
Rajjix
But i have read something about them being used with viewsets, maybe try google that hopefully you’ll find something
Ronald
thanks
Ronald
haha been googling for the last 5 hours
Ronald
not much luck
Rajjix
lets hope an admin is having a good mood 2day and will point you out
Mirco
not much luck
R u using Django Rest ?
Sharif
Hello everyone. Can I write program to microsexm in the Python
Mahesh
Sharif
Can I write programs for mechanical objects? For example, to the robot
Sharif
Yaaa...dats what python is meant for
I do not understand you🤔
Sharif
Are You mentioned python versions?
Sharif
?
George
And your select fields are still empty , right ?
Yes, i dumped the log from the database and no query is being made
George
can you share your imports too?
imports in the forms.py?
inchidi
yes
George
yes
from django import forms from annotation_web.models import FailureType from django.forms import widgets from django.utils.translation import ugettext_lazy as _ from django_select2.forms import ModelSelect2Widget
inchidi
from django import forms from annotation_web.models import FailureType from django.forms import widgets from django.utils.translation import ugettext_lazy as _ from django_select2.forms import ModelSelect2Widget
i didnt see anything wrong with your form, its possible you are calling different form at your views? can you share your views too to make sure?
George
yes
George
but the form fields are ok
George
i didnt see anything wrong with your form, its possible you are calling different form at your views? can you share your views too to make sure?
def index(request): form2 = FailureForm() context = { 'failureForm':form2 } return render(request, 'annotation_web/annotation.html',context)
inchidi
how about the js needed by django select2
inchidi
its loaded properly?
George
but it doesn't appear later in the html
inchidi
already check browser console?