Re: uwsgi stats middleware for Django

2017-12-09 Thread Etienne Robillard
Dear Adler, Thanks again for sharing your code with us. Do you think it would be possible to use asyncio to defer the computation of the active connections from the view or middleware ? Best regards, Etienne Le 2017-12-08 à 11:19, Adler Neves a écrit : forgot mentioning: the number of act

Re: Need Help with Many to Many Fields

2017-12-09 Thread Constantine Covtushenko
Hi Mark, You should not create 2 methods. Just change that first to be like: return obj.document.all().values_list('field_1', 'field_2') With this you will get QuerySet of tuples, like I believe it should solve your problem. Also for more references about values_list, check following document

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
Constantine, Thanks for the link and update! However, I am not sure how to make two columns in the CollectionsAdmin table without two functions. class COllectionAdmin(self, obj): list_display = On Sat, Dec 9, 2017 at 8:53 AM, Constantine Covtushenko < constantine@gmail.com> wrote: > Hi Mark

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
Hit send by accident... Constantine, Thanks for the link and update! However, I am not sure how to make two columns in the CollectionsAdmin table without two functions. class CollectionAdmin(self, obj): list_display = ('get_field_1', 'get_field_2', ) def get_field_1(self, obj):

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
should have been class CollectionAdmin(admin.ModelAdmin) in the above post. Mark On Sat, Dec 9, 2017 at 9:16 AM, Mark Phillips wrote: > Hit send by accident... > > Constantine, > > Thanks for the link and update! However, I am not sure how to make two > columns in the CollectionsAdmin table wi

Re: uwsgi stats middleware for Django

2017-12-09 Thread Ádler Oliveira Silva Neves
Hello once more time, Etienne! There's a GitHub gist from two years ago on making a Django application use asyncio. A consequence of bringing such data through middlewares is that you will trigger a HTTP request against localhost a

Re: Need Help with Many to Many Fields

2017-12-09 Thread Constantine Covtushenko
Hi Marks, Ok, I would use `prefetch_related` method then. https://docs.djangoproject.com/en/2.0/ref/models/querysets/#prefetch-related you should override `get_queryset` with something like that: def get_queryset(self, request): return super().get_queryset(request).prefetch_related('document

[no subject]

2017-12-09 Thread chaitanya goud
Hey I would like to know about Where to download a e-commerce website in django and how run it -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsub

Django tests fails - migration error

2017-12-09 Thread Matej Šnuderl
Since upgrading to Django 2.0 I'm getting SQL error while trying to run python manage.py test. (rest) λ → ✘ msnuderl@Matejs-MBP  ~/Workspace/Personal/homsterNoi   master ●  python manage.py test Creating test database for alias 'default'... Got an error creating the test database: database

Re:

2017-12-09 Thread Etienne Robillard
Hi Chaitanya, If you're not afraid of getting your hands dirty by playing with django-hotsauce, you could try django-livestore, a fork of the Satchmo framework. See: https://bitbucket.org/tkadm30/livestore Best regards, Etienne Le 2017-12-09 à 14:33, chaitanya goud a écrit : Hey I would l

Django 2.0 Tutorial Template

2017-12-09 Thread Carl Brubaker
I'm not sure what is wrong, but my template doesn't load correctly. Instead of what I'm supposed to see I get this in my web browser: What yo? Help please! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Re: Django 2.0 Tutorial Template

2017-12-09 Thread Dylan Reinhold
Show us your template. Dylan On Sat, Dec 9, 2017 at 1:44 PM, Carl Brubaker wrote: > I'm not sure what is wrong, but my template doesn't load correctly. > Instead of what I'm supposed to see I get this in my web browser: > > > > > > What yo? > > > > > > > > Help please! > > -- > Yo

Re: Django 2.0 Tutorial Template

2017-12-09 Thread Carl Brubaker
I copied it from the django tutorial page: {% if latest_question_list %} {% for question in latest_question_list %} {{ question.question_text }} {% endfor %} {% else %} No polls are available. {% endif %} -- You received this message because you are subscribed to

Django 1.11

2017-12-09 Thread minh quang
Hi all, i am begining develop web django. If i buid django web app to manage studen't score result then will i creat what model is? ,thanks all? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Django 2.0 Tutorial Template

2017-12-09 Thread Dylan Reinhold
That looks fine. how about your view.py. Dylan On Sat, Dec 9, 2017 at 6:05 PM, Carl Brubaker wrote: > I copied it from the django tutorial page: > > {% if latest_question_list %} > > {% for question in latest_question_list %} > {{ question.question_text > }} > {% endfor %}