Re: django-tenants domain issue

2020-06-02 Thread Dumba Classics
Nope I was just doing it on Localhost to test on how feasible it is for my project. Instead of checking with an app thats live I created a dummy project nd thats where I was working on. Why ask???

Re: pagination of a specific context in multiple context in ListView not working in django?

2020-06-02 Thread Hella Nick
Do you use Django or Django Rest Framework? Ali Ahammad 于2020年6月2日周二 上午7:51写道: > in django, i am trying to list some queries of several objects like user > lists, categoies and Post list. the homepage will be contained couple of > blocks or boxes. each box will have different query list like Pos

Re: Model Arithmetic Operation

2020-06-02 Thread Hella Nick
- Niggers are clearly not suited for the job. Ifeanyi Chielo 于2020年6月3日周三 上午7:43写道: > Dear all, > > Hello, please can someone help me with the code to subtract 'b' from 'a' > as shown below > > > a = Soapprod.objects.aggregate(Sum('Serial_White_Guava')) > > > > b = Soapsales.objects.agg

Re: django-tenants domain issue

2020-06-02 Thread Hella Nick
你是要部署在互联网上吗? DumbaClassics 于2020年6月3日周三 上午8:56写道: > Hello Family > > I have been following a set up documentation for django-tenants. I did all > the set-up to even create a public domain and two tenant domains. For > allowed hosts I put ["*"] , though not safe as per clinical research data > it

django-tenants domain issue

2020-06-02 Thread DumbaClassics
Hello Family I have been following a set up documentation for django-tenants. I did all the set-up to even create a public domain and two tenant domains. For allowed hosts I put ["*"] , though not safe as per clinical research data its convinient for my localhost Test. I am having a challenge n

Model Arithmetic Operation

2020-06-02 Thread Ifeanyi Chielo
Dear all, Hello, please can someone help me with the code to subtract 'b' from 'a' as shown below a = Soapprod.objects.aggregate(Sum('Serial_White_Guava')) b = Soapsales.objects.aggregate(Sum('Serial_White_Guava')) class Soapprod (models.Model): id = models.AutoField(primary_key=T

Custom template tags - instance.templatetag

2020-06-02 Thread Jan Gregorczyk
Hi! How to change my template tag? from django import template register = template.Library() @register.simple_tag def votes_up_exists(answer, user_id): pass how I use it - {% votes_up_exists answer request.user.id %} how I would like to use it - {% answer.votes_up_exists user_id %} -- You rece

UpdateView and def post()

2020-06-02 Thread 'MH' via Django users
Hi I want to modidy my view that is based on UpdateView and it should work when called via post method. This is what I have so far and I am not sure if it makes sense or if it could be done in an easier way. class GD_Update(UpdateView): # setting the model, form_class and template_name mod

Re: Issue with serving angular with django

2020-06-02 Thread Sunday Iyanu Ajayi
Hi Andréas , It actually followed the digital oceans setup in setting up the nginx server *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.com * On Mon, Jun 1, 2020 at 6:24 PM Andréas Kühne wrote: > Hi Sunday, > > No - you don't. What collectstatic does is it collects all of the stati

Re: Good usage of native JSON functions and operators in ORM queries

2020-06-02 Thread Shaheed Haque
On Sat, 30 May 2020 at 13:49, Shaheed Haque wrote: > Hi, > > I have a model MyModel which has a JSONField() called 'snapshot'. In > Python terms, each snapshot looks like this: > > == > snapshot = { > 'pay_definition' : { > '1234': {..., 'name': 'foo', ...}, >

DJango upvoting, downvoting - functions in templates

2020-06-02 Thread Jan Gregorczyk
I'm using this package https://pypi.org/project/django-vote/ and i want to do something smilar to this guy https://github.com/shellfly/django-vote/issues/51 - I need function callable in template, which will tell me if user has downvoted or upvoted, but exactly downvoted or exactly upvoted. I