Sunday, July 31, 2022

Special characters in translations

Hi,

I need to translate a string that contains a non-breaking space ("\xa0"), but I can't find a way to translate this string properly. The translation ignores the special character or doesn't translate the string at all. Eventually I came up with this solution:

from django.utils.translation import gettext_lazy as _, pgettext_lazy

            return _("On {date} ({timesince} ago)")\
                .replace(" ago)", "\xa0ago)")\
                .replace("(לפני ", "(לפני\xa0")\
                .format(
                    date=formats.date_format(value=last_visit_date),
                    timesince=timesince(d=last_visit_date, now=today),
                )
Which works, but I would prefer to translate the string properly and not replace the translated string after its translation.

Notice that English returns the original string without any translation.

(I tried to translate the string "On {date} ({timesince}\xa0ago)" but it didn't work)

Any ideas?

Thanks,

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABD5YeHApgN7yWJKWEcVLeUUTzs94z5-kWRy%3D_pMAMm2Tkonng%40mail.gmail.com.

Re: Why do we need Django rest framework when our conventional django do what we want?

It really depends on your usecase. If you find that you can work without an API for your ecommerce website, then you don't need it. If you believe you need to make your ecommerce as a headless ecommerce site, then you need an API or GraphQL or other means of sharing data.

On Sunday, July 31, 2022 at 10:24:17 PM UTC+8 josephb...@gmail.com wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1ad7a40e-db94-488a-86fc-bf3654936b48n%40googlegroups.com.

Re: Why do we need Django rest framework when our conventional django do what we want?

Sure... You need it

On Sun, Jul 31, 2022, 3:24 PM Joseph Bashorun <josephbashorun5@gmail.com> wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e45680e6-7c40-4ff4-985b-6cdc31a59e29n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOfwBVgCnpX5iNmpF3Rfo1rLwHZk93OGXnf_OWZcoDesKv99vw%40mail.gmail.com.

Re: Why do we need Django rest framework when our conventional django do what we want?


There are a couple of projects built in Django for this, for example Django-Oscar or saleor(community version), the last one is a tech stack a little bigger but really fast and customizable.

If you want to start one from scratch, be sure to check both projects as they have good abstraction classes.

Regards



El El dom, 31 de jul. de 2022 a la(s) 16:02, Ram <ram.mullapudi@gmail.com> escribió:
Hi,

In my opinion if you are starting from scratch to develop your ecommerce application, I would encourage you to start with DRF, but if in case if you can not afford to write DRF APIs for an existing application, you might want to refer this:


Disclaimer: I can not give any guarantee on this article because we did not try this. In fact I would like to hear comments from other experts here about this article?

Best regards,
~Ram



On Sun, Jul 31, 2022 at 8:30 AM Lakshyaraj Dash <dashlakshyaraj2006@gmail.com> wrote:
You need drf aka DjangoRestFramework because it provides a smooth api for your application. It comes into use whenever you're trying to have a javascript framework like ReactJS or NextJS or Angular or VueJS etc... On the client side. If you inject js framework in the frontend you also need a package called django-cors-headers.

You can also use drf with django if you don't have any js frameworks in the client side. In this case you don't need a cors headers package.

Thanks and Regards
Lakshyaraj Dash

On Sun, Jul 31, 2022, 19:53 Joseph Bashorun <josephbashorun5@gmail.com> wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e45680e6-7c40-4ff4-985b-6cdc31a59e29n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF7qQgCcfSxsJjbpgPUbW%2Bs1kUDB9VF2ES9QfzUrKrt%3DiYUhLg%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F11sjbkoXN6PpQvHOknTCSbmyvG6Yis9aKJESzhOyuQNA%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHRQUHk%2Bn4A%3DK-tBp3BcL86L3%3DRJgouMsDzQrQS-woiCzN_YOQ%40mail.gmail.com.

Re: Why do we need Django rest framework when our conventional django do what we want?

Hi,

In my opinion if you are starting from scratch to develop your ecommerce application, I would encourage you to start with DRF, but if in case if you can not afford to write DRF APIs for an existing application, you might want to refer this:


Disclaimer: I can not give any guarantee on this article because we did not try this. In fact I would like to hear comments from other experts here about this article?

Best regards,
~Ram



On Sun, Jul 31, 2022 at 8:30 AM Lakshyaraj Dash <dashlakshyaraj2006@gmail.com> wrote:
You need drf aka DjangoRestFramework because it provides a smooth api for your application. It comes into use whenever you're trying to have a javascript framework like ReactJS or NextJS or Angular or VueJS etc... On the client side. If you inject js framework in the frontend you also need a package called django-cors-headers.

You can also use drf with django if you don't have any js frameworks in the client side. In this case you don't need a cors headers package.

Thanks and Regards
Lakshyaraj Dash

On Sun, Jul 31, 2022, 19:53 Joseph Bashorun <josephbashorun5@gmail.com> wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e45680e6-7c40-4ff4-985b-6cdc31a59e29n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF7qQgCcfSxsJjbpgPUbW%2Bs1kUDB9VF2ES9QfzUrKrt%3DiYUhLg%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F11sjbkoXN6PpQvHOknTCSbmyvG6Yis9aKJESzhOyuQNA%40mail.gmail.com.

Re: 如何在Django4.0.6中使用MongoDB数据库

pip install djongo
pip install pytz
pip install pymongo==3.12.3

settings.py:

import djongo

#Database is localhost:
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': 'your-db-name',
'ENFORCE_SCHEMA': False
}
}

#Database is server:
DATABASES = {
 'default': {
 'ENGINE': 'djongo',
 'NAME': 'your-db-name',
'ENFORCE_SCHEMA': False,
 'CLIENT': {
'host': 'host-name or ip address',
'port': port_number, 'username': 'db-username',
 'password': 'password',
'authSource': 'db-name',
 'authMechanism': 'SCRAM-SHA-1'
 },
'LOGGING': {
'version': 1,
'loggers': {
 'djongo': {
'level': 'DEBUG',
 'propagate': False,
 }
 },
},
 }
}


Django Terminal:

python  manage.py makemigrations

python  manage.py migrate


hellatho...@gmail.com schrieb am Dienstag, 19. Juli 2022 um 21:47:26 UTC-5:
Hi guys
我查询了很多的资料,发现Django无法很好的连接MongoDB(该数据库在其他的服务器中),我需要解决如下问题:

1、在settings.py文件中设置连接MongoDB,需要密码
2、在models.py文件中建立模型
3、在views.py中进行数据的读写操作

我尝试了在python中进行连接,但是我不知道如何在Django中进行连接MongoDB,以下是我的环境配置信息:

python==3.9.0
django==4.0.6
pymongo==4.1.1
mongoengine==0.24.1

DATABASE
0220720104558.png

如果您帮我,我将对您万分感谢。

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/30443d79-678d-4312-8c44-1bdf3eee5c1dn%40googlegroups.com.

Re: MongoDB connection with django

Just in case someone is still interested in an answer ( after 6 month ?)

pip install pytz (its missing in djongo package)
pip install pymongo==3.12.3
python  manage.py makemigrations
python  manage.py migrate

this solution was provided in :

Kasper Laudrup schrieb am Dienstag, 18. Januar 2022 um 04:56:29 UTC-6:
On 18/01/2022 11.37, Sai Kiran Mekala wrote:
> Same brother ,

Which brother?

> I tried with mongoengine still persist with same exception error .
>

I don't think it's possible for us to communicate. Maybe someone else
can help.

Kind regards,

Kasper Laudrup

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2b93b8c0-43a3-4476-bdef-ea206ae88cc1n%40googlegroups.com.

Re: ForeignKey Reverse Relation Fail

Using many to many relationship will work better.
Nice note 🤗
Your quote Translation :
"لا يؤمن احدكم حتي يحب لاخيه ما يحب لنفسه"

On 27 Jul 2022 19:04, "Malik Rumi" <malik.a.rumi@gmail.com> wrote:
Thanks, but the recursive foreignkey *is* a one to many relationship... unless you're talking about something else?
"None of you has faith until he loves for his brother or his neighbor what he loves for himself."


On Wed, Jul 27, 2022 at 10:16 AM Ammar Mohammed <amarben1000@gmail.com> wrote:

Hi
Have you tried using OneToMany relationship ?

On 27 Jul 2022 12:18, "Malik Rumi" <malik.a.rumi@gmail.com> wrote:
I have a model with a recursive foreign key to 'self'. This is intended to model a parent child
relation among instances. The forward relation, on a field called 'childof', works as expected.
The reverse relation, using the related_name 'parent', comes up as a RelatedManager,
again as expected. However, parent.count(), parent.all(), etc., always give me the "Manager is
not accessible on instances" error. Many of these parent instances will themselves also be a
childof some other instance, and apparently, that's my problem. I don't know how to make Django
recognize the dual nature of some instances. Is there a way to hack the RelatedManager to fix this?

I am not getting any accessor errors from manage.py check.

I posted this to Django Forum, but the respondent was not able to duplicate my issue - i.e.,
he said it worked as expected for him. :-(

I saw a suggestion to use an explicit junction table on Stack Overflow, but making a round trip - or two - to an external table seems like an
awful lot of overhead for this situation.

If instead of a junction table, if I made an explicit parentto field on the model, would that work?
Presumably the related name on the childof field would still fail like it does now,
but I would instead have the explicit parent field to work with. I still would not have the
automatic reverse relation, and I would have to come up with a script to fill in the parentto
field, but that might solve my problem:
# pseudocode
family = c.itertools.groupby(instance.childof)
family = c.pandas.groupby(instance.childof)
for f in family:
pop = c.objects.get(instance.childof)
OR
pop = instance.childof
c.objects.update(pop.parentto=f) # where parentto is a Postgresql ArrayField
OR # https://docs.djangoproject.com/en/4.0/ref/models/relations/#django.db.models
.fields.related.RelatedManager.add:
>>> b = Blog.objects.get(id=1)
>>> e = Entry.objects.get(id=234)
>>> b.entry_set.add(e) # Associates Entry e with Blog b
SEE ALSO: https://docs.djangoproject.com/en/4.0/topics/db/examples/many_to_one/

If I did this two field hack, then I don't really need either one to be ForeignKeys any more,
do I? They could be a CharField and an ArrayField, couldn't they? That breaks the extended
lookup chain - but I don't have that now, anyway - or at least, I only have it in one direction.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3555d391-9c9e-440f-a603-103c9ccdc858n%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/xGtwxhx2Nrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHs1H7tjom_GRucP8Dx3x8AzQobS4GCva8a0nuN3bEWVB2Taqw%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKd6oBxYfR6ntzGe8EGbnm0z6%2BxjiJDP5nmg9kF5kuB9pCZiEg%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHs1H7sLom%3DupzWEEt2X%2BYz2GPHdOb7zvawH5DqUkyoqk2XYjg%40mail.gmail.com.

Re: ForeignKey Reverse Relation Fail

Since this is a question about your models, please post your models.py.

On 7/27/22 5:18 AM, Malik Rumi wrote:
I have a model with a recursive foreign key to 'self'. This is intended to model a parent child
relation among instances. The forward relation, on a field called 'childof', works as expected.
The reverse relation, using the related_name 'parent', comes up as a RelatedManager,
again as expected. However, parent.count(), parent.all(), etc., always give me the "Manager is
not accessible on instances" error. Many of these parent instances will themselves also be a
childof some other instance, and apparently, that's my problem. I don't know how to make Django
recognize the dual nature of some instances. Is there a way to hack the RelatedManager to fix this?

I am not getting any accessor errors from manage.py check.

I posted this to Django Forum, but the respondent was not able to duplicate my issue - i.e.,
he said it worked as expected for him. :-(

I saw a suggestion to use an explicit junction table on Stack Overflow, but making a round trip - or two - to an external table seems like an
awful lot of overhead for this situation.

If instead of a junction table, if I made an explicit parentto field on the model, would that work?
Presumably the related name on the childof field would still fail like it does now,
but I would instead have the explicit parent field to work with. I still would not have the
automatic reverse relation, and I would have to come up with a script to fill in the parentto
field, but that might solve my problem:
# pseudocode
family = c.itertools.groupby(instance.childof)
family = c.pandas.groupby(instance.childof)
for f in family:
pop = c.objects.get(instance.childof)
OR
pop = instance.childof
c.objects.update(pop.parentto=f) # where parentto is a Postgresql ArrayField
OR # https://docs.djangoproject.com/en/4.0/ref/models/relations/#django.db.models
.fields.related.RelatedManager.add:
>>> b = Blog.objects.get(id=1)
>>> e = Entry.objects.get(id=234)
>>> b.entry_set.add(e) # Associates Entry e with Blog b
SEE ALSO: https://docs.djangoproject.com/en/4.0/topics/db/examples/many_to_one/

If I did this two field hack, then I don't really need either one to be ForeignKeys any more,
do I? They could be a CharField and an ArrayField, couldn't they? That breaks the extended
lookup chain - but I don't have that now, anyway - or at least, I only have it in one direction.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3555d391-9c9e-440f-a603-103c9ccdc858n%40googlegroups.com.

Re: Why do we need Django rest framework when our conventional django do what we want?

You need drf aka DjangoRestFramework because it provides a smooth api for your application. It comes into use whenever you're trying to have a javascript framework like ReactJS or NextJS or Angular or VueJS etc... On the client side. If you inject js framework in the frontend you also need a package called django-cors-headers.

You can also use drf with django if you don't have any js frameworks in the client side. In this case you don't need a cors headers package.

Thanks and Regards
Lakshyaraj Dash

On Sun, Jul 31, 2022, 19:53 Joseph Bashorun <josephbashorun5@gmail.com> wrote:

I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e45680e6-7c40-4ff4-985b-6cdc31a59e29n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF7qQgCcfSxsJjbpgPUbW%2Bs1kUDB9VF2ES9QfzUrKrt%3DiYUhLg%40mail.gmail.com.

Why do we need Django rest framework when our conventional django do what we want?


I am stuck in a loop of confusion. I am trying to build an ecommerce website and make it production ready. Do i need to build an API for 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e45680e6-7c40-4ff4-985b-6cdc31a59e29n%40googlegroups.com.

Friday, July 29, 2022

Become Django Member in WhatsApp group

Dear Pythonian & Djangoian,


I am delighted to invite you on behalf of python & django to become a free member today in WhatsApp group.


Here you can join in our WhatsApp group using below link👇


https://chat.whatsapp.com/Bq2jcxLJVG50v9Wbkvz6Vy


[Membership benefits] Here are some great perks you get for becoming a member:

  • Ask your python & django related problems: get quick possible answer.
  • Friendly environment: you can learn python & django from core.
  • Daily Python Assignment exercise.


Thank you for your consideration, I look forward to hearing from you and hope to see you at our WhatsApp python group.



--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANd-%2BoDOtAeWPy6JofNBu38_HvPTnCEA_AACow2HeUxaGSzg-g%40mail.gmail.com.

Re: Become Django member in WhatsApp group

Hey if you want to store your json as a django model data in the admin panel then follow the documentation link below.

Thanks and Regards
Lakshyaraj Dash

On Fri, Jul 29, 2022, 04:26 Manpreet Kaur <manpreetkaur030609@gmail.com> wrote:
Hello Dear,
I am Manpreet Kaur, i need your assistance to solve a problem. actually i have json file  and i have to store that data to django admin panel. how do i store json file data to django admin panel. i need solution on priority. please provide solution as soon as possible actually i have to run that program in office tomorrow.

On Tuesday, July 26, 2022 at 11:25:04 PM UTC+5:30 satyajit...@gmail.com wrote:
Dear Pythonian & Djangoian,


I am delighted to invite you on behalf of python & django to become a free member today in WhatsApp group.


Here you can join in our WhatsApp group using below link👇


https://chat.whatsapp.com/Bq2jcxLJVG50v9Wbkvz6Vy


[Membership benefits] Here are some great perks you get for becoming a member:

  • Ask your python & django related problems: get quick possible answer.
  • Friendly environment: you can learn python & django from core.
  • Daily Python Assignment exercise.


Thank you for your consideration, I look forward to hearing from you and hope to see you at our WhatsApp python group.



Thanks & Best Regards,

Satyajit Barik

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83236576-4563-409a-a07a-1c94e9ab3cc5n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF7qQgCWYNyE8ErejwcNK_zV6apFKj1hnbQVwP92JYi2AxqSWw%40mail.gmail.com.

Re: Hi guys how to run pyscript on local webserver without using cdn ljnk

Is it a joke? Please write a description which Problem you have...

Ad Tariq <adtariq69@gmail.com> schrieb am Fr., 29. Juli 2022, 16:58:


Sent from my Huawei Mobile

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6ywask-egl8ube6tn3j-gnugz6tq5tn5-981h8o-fbbyrfs04g4p-dy72o68w852c9bhuw0fdasxpttm02p-njks7934b8sl-h99obj3i1f0vq63om8-okzqxt-kcl72n-o861ua-tut0wbuki823ym9cfl.1659106691758%40email.android.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKGT9mzChcVZUVz644GpAy-JkNympF2NCuNQNAaP-u%2BCUCC-LQ%40mail.gmail.com.

Thursday, July 28, 2022

Re: Become Django member in WhatsApp group

Hello Dear,
I am Manpreet Kaur, i need your assistance to solve a problem. actually i have json file  and i have to store that data to django admin panel. how do i store json file data to django admin panel. i need solution on priority. please provide solution as soon as possible actually i have to run that program in office tomorrow.

On Tuesday, July 26, 2022 at 11:25:04 PM UTC+5:30 satyajit...@gmail.com wrote:
Dear Pythonian & Djangoian,


I am delighted to invite you on behalf of python & django to become a free member today in WhatsApp group.


Here you can join in our WhatsApp group using below link👇


https://chat.whatsapp.com/Bq2jcxLJVG50v9Wbkvz6Vy


[Membership benefits] Here are some great perks you get for becoming a member:

  • Ask your python & django related problems: get quick possible answer.
  • Friendly environment: you can learn python & django from core.
  • Daily Python Assignment exercise.


Thank you for your consideration, I look forward to hearing from you and hope to see you at our WhatsApp python group.



Thanks & Best Regards,

Satyajit Barik

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83236576-4563-409a-a07a-1c94e9ab3cc5n%40googlegroups.com.

Become Django member in WhatsApp group

Dear Pythonian & Djangoian,


I am delighted to invite you on behalf of python & django to become a free member today in WhatsApp group.


Here you can join our WhatsApp group using the below link👇


https://chat.whatsapp.com/Bq2jcxLJVG50v9Wbkvz6Vy


[Membership benefits] Here are some great perks you get for becoming a member:

  • Ask your python & django related problems: get quick possible answers.
  • Friendly environment: you can learn python & django from core.
  • Daily Python Assignment exercise.


Thank you for your consideration, I look forward to hearing from you and hope to see you at our WhatsApp python group.



Thanks & Best Regards,

Satyajit Barik

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANd-%2BoBdTe2FsL1xe%2BkBtu7YAzWNrtT3w%2BkA11r4qJLmako17Q%40mail.gmail.com.

Re: Thanks

Thank you for your email.

On Thu, Jul 28, 2022, 8:48 AM Mark Odoyo <markpeterdoyoo@gmail.com> wrote:
Thanks


On Fri, Jul 22, 2022, 7:49 PM Gerardo Palazuelos Guerrero <gerardo.palazuelos@gmail.com> wrote:
I'm watching this series, it might help you understand.

Python & Django 3.2 Tutorial Series

--
Gerardo Palazuelos Guerrero



On Fri, Jul 22, 2022 at 10:35 AM nick washington <niwago71@gmail.com> wrote:
How do you want my help

On Fri, Jul 22, 2022, 18:08 Edward Deus Misogoro <emisogoro@gmail.com> wrote:
Please help

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/af039f64-f2f6-4994-a33c-f519882dbb13n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAETXisckFSb%3DtS-BvfcFvwmT1%3Dtzz8OPAR22u2WOWrWa-YPuXQ%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ8iCyMzLJinS7Udwd-%3D4n5yfejUaJ64exOmzQ1vODpeVWRDhQ%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFm0m6S9Kq%2B3EYi1CTXTr%3D84se%3Df-JE3w73Kj4R0Ns1Qa3rhNg%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ4fu7xkEABTHaB3ON2ZxNMn6N5mLSgKPXCGx7T%3DydnAzWwi_w%40mail.gmail.com.

Re: How to create current user field in dango rest framework

A quick search on Stack overflow shows me this: https://stackoverflow.com/a/43032332

Abdul Qoyyuum Bin Haji Abdul Kadir
System Engineer at Card Access Services
HP: +673 720 8043

On Thu, Jul 28, 2022, 4:19 AM Ashok garsulla <ashokkumarbediapci@gmail.com> wrote:
Please tell me how can I create current User in dango Rest Framework

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/21baa025-b118-4f15-bba3-52f4875c1d33n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA3DN%3DV4K-xvnN_%2B9w-XpE684qqNhduBPAwXrc54TPM3S1zqDA%40mail.gmail.com.

Re:Thanks

Thanks


On Fri, Jul 22, 2022, 7:49 PM Gerardo Palazuelos Guerrero <gerardo.palazuelos@gmail.com> wrote:
I'm watching this series, it might help you understand.

Python & Django 3.2 Tutorial Series

--
Gerardo Palazuelos Guerrero



On Fri, Jul 22, 2022 at 10:35 AM nick washington <niwago71@gmail.com> wrote:
How do you want my help

On Fri, Jul 22, 2022, 18:08 Edward Deus Misogoro <emisogoro@gmail.com> wrote:
Please help

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/af039f64-f2f6-4994-a33c-f519882dbb13n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAETXisckFSb%3DtS-BvfcFvwmT1%3Dtzz8OPAR22u2WOWrWa-YPuXQ%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ8iCyMzLJinS7Udwd-%3D4n5yfejUaJ64exOmzQ1vODpeVWRDhQ%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFm0m6S9Kq%2B3EYi1CTXTr%3D84se%3Df-JE3w73Kj4R0Ns1Qa3rhNg%40mail.gmail.com.

Re: How to create current user field in dango rest framework

Hi Ashok
Do you wabt to use the current user or creating a new user ?
Is it like signing up a new user ?

On 27 Jul 2022 22:19, "Ashok garsulla" <ashokkumarbediapci@gmail.com> wrote:
Please tell me how can I create current User in dango Rest Framework

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/21baa025-b118-4f15-bba3-52f4875c1d33n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHs1H7siqeasuph7BxhXm43n66cdpPu5ED4pW7oNzue95Wu-cw%40mail.gmail.com.

Wednesday, July 27, 2022

Re: Django tutor.


On Wed, 27 Jul 2022 at 22:22, nick washington <niwago71@gmail.com> wrote:
Cool

On Wed, Jul 27, 2022, 18:19 Md Aminul Haque <aminulisalmtpi9@gmail.com> wrote:
Show Django Official website 

Sent from my Huawei phone


-------- Original message --------
From: pediah wanmi <pediahw@gmail.com>
Date: Wed, Jul 27, 2022, 5:22 PM
To: django-users@googlegroups.com
Subject: Django tutor.
I am a djongk intermediary, please can I
 get a tutor?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABd3QauHU4wdePFvGsY3V-GSO8Ly37zMqgmcV2tyDV56Sw81Tw%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dun4asa4bdzxtzjwj4-3qjf8j-urdlt42i1gaiz8sfaua9chke-albmexg650pjd8w9no-mjoqq4cguikj-bk51if-em08lf-jw7g21idl3xdyre5d8-v97n9i-lanxvz6om99w-w4oi0-dog49dbovagl.1658932720646%40email.android.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAETXisem7FDUpRd1VZt7kFu2VhdNp7XTUU0eLSAMJrhnFOv-Wg%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGp2JVFe%2BfKcgdOnkOYzao%2BBhiAKCoyQ1ihN4UEthCoqQwfwbQ%40mail.gmail.com.

How to create current user field in dango rest framework

Please tell me how can I create current User in dango Rest Framework

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/21baa025-b118-4f15-bba3-52f4875c1d33n%40googlegroups.com.

Re: Django tutor.

Honestly this Django community is cool, you can ask any question.
What do you want to do ? Django rest API or 
Django in full stack ?

Bien cordialement,

Julien Munar.


Le 27 juil. 2022 à 18:52, nick washington <niwago71@gmail.com> a écrit :


Cool

On Wed, Jul 27, 2022, 18:19 Md Aminul Haque <aminulisalmtpi9@gmail.com> wrote:
Show Django Official website 

Sent from my Huawei phone


-------- Original message --------
From: pediah wanmi <pediahw@gmail.com>
Date: Wed, Jul 27, 2022, 5:22 PM
To: django-users@googlegroups.com
Subject: Django tutor.
I am a djongk intermediary, please can I
 get a tutor?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABd3QauHU4wdePFvGsY3V-GSO8Ly37zMqgmcV2tyDV56Sw81Tw%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dun4asa4bdzxtzjwj4-3qjf8j-urdlt42i1gaiz8sfaua9chke-albmexg650pjd8w9no-mjoqq4cguikj-bk51if-em08lf-jw7g21idl3xdyre5d8-v97n9i-lanxvz6om99w-w4oi0-dog49dbovagl.1658932720646%40email.android.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAETXisem7FDUpRd1VZt7kFu2VhdNp7XTUU0eLSAMJrhnFOv-Wg%40mail.gmail.com.

Re: ForeignKey Reverse Relation Fail

Thanks, but the recursive foreignkey *is* a one to many relationship... unless you're talking about something else?
"None of you has faith until he loves for his brother or his neighbor what he loves for himself."


On Wed, Jul 27, 2022 at 10:16 AM Ammar Mohammed <amarben1000@gmail.com> wrote:

Hi
Have you tried using OneToMany relationship ?

On 27 Jul 2022 12:18, "Malik Rumi" <malik.a.rumi@gmail.com> wrote:
I have a model with a recursive foreign key to 'self'. This is intended to model a parent child
relation among instances. The forward relation, on a field called 'childof', works as expected.
The reverse relation, using the related_name 'parent', comes up as a RelatedManager,
again as expected. However, parent.count(), parent.all(), etc., always give me the "Manager is
not accessible on instances" error. Many of these parent instances will themselves also be a
childof some other instance, and apparently, that's my problem. I don't know how to make Django
recognize the dual nature of some instances. Is there a way to hack the RelatedManager to fix this?

I am not getting any accessor errors from manage.py check.

I posted this to Django Forum, but the respondent was not able to duplicate my issue - i.e.,
he said it worked as expected for him. :-(

I saw a suggestion to use an explicit junction table on Stack Overflow, but making a round trip - or two - to an external table seems like an
awful lot of overhead for this situation.

If instead of a junction table, if I made an explicit parentto field on the model, would that work?
Presumably the related name on the childof field would still fail like it does now,
but I would instead have the explicit parent field to work with. I still would not have the
automatic reverse relation, and I would have to come up with a script to fill in the parentto
field, but that might solve my problem:
# pseudocode
family = c.itertools.groupby(instance.childof)
family = c.pandas.groupby(instance.childof)
for f in family:
pop = c.objects.get(instance.childof)
OR
pop = instance.childof
c.objects.update(pop.parentto=f) # where parentto is a Postgresql ArrayField
OR # https://docs.djangoproject.com/en/4.0/ref/models/relations/#django.db.models
.fields.related.RelatedManager.add:
>>> b = Blog.objects.get(id=1)
>>> e = Entry.objects.get(id=234)
>>> b.entry_set.add(e) # Associates Entry e with Blog b
SEE ALSO: https://docs.djangoproject.com/en/4.0/topics/db/examples/many_to_one/

If I did this two field hack, then I don't really need either one to be ForeignKeys any more,
do I? They could be a CharField and an ArrayField, couldn't they? That breaks the extended
lookup chain - but I don't have that now, anyway - or at least, I only have it in one direction.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3555d391-9c9e-440f-a603-103c9ccdc858n%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/xGtwxhx2Nrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHs1H7tjom_GRucP8Dx3x8AzQobS4GCva8a0nuN3bEWVB2Taqw%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKd6oBxYfR6ntzGe8EGbnm0z6%2BxjiJDP5nmg9kF5kuB9pCZiEg%40mail.gmail.com.

Re: Django tutor.

Cool

On Wed, Jul 27, 2022, 18:19 Md Aminul Haque <aminulisalmtpi9@gmail.com> wrote:
Show Django Official website 

Sent from my Huawei phone


-------- Original message --------
From: pediah wanmi <pediahw@gmail.com>
Date: Wed, Jul 27, 2022, 5:22 PM
To: django-users@googlegroups.com
Subject: Django tutor.
I am a djongk intermediary, please can I
 get a tutor?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABd3QauHU4wdePFvGsY3V-GSO8Ly37zMqgmcV2tyDV56Sw81Tw%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dun4asa4bdzxtzjwj4-3qjf8j-urdlt42i1gaiz8sfaua9chke-albmexg650pjd8w9no-mjoqq4cguikj-bk51if-em08lf-jw7g21idl3xdyre5d8-v97n9i-lanxvz6om99w-w4oi0-dog49dbovagl.1658932720646%40email.android.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAETXisem7FDUpRd1VZt7kFu2VhdNp7XTUU0eLSAMJrhnFOv-Wg%40mail.gmail.com.

Re: Best digital ocean plan for a production server

Hi Abdul,

Thank you for your suggestion, but since you mentioned Docker image in your earlier email, I've listed all my software stack that is required for our Web Application. So I'm looking for any managed solution from any provider that can help us to focus only on coding. It does not have to be Kubernetes solution and anything is fine as long as we don't have to spend time on infrastructure and yet scalable & feasible.

Also, along with the previous list of software stack, we are planning to develop Django REST APIs and a mobile app using Flutter which could add additional software to the list. 

I explored both Digital Ocean and Heroku so far and I'm struggling to find the right solution from both of them. So I emailed them to see what they can recommend to us.

Best regards,
~Ram

On Sun, Jul 24, 2022 at 8:30 PM Abdul Qoyyuum <aqoyyuum@cardaccess.com.au> wrote:
Not sure what you mean. All of those can be in separate docker images to build (except for 11 and 13) but have to be docker-composed properly. But since you're moving to Docker images, you can then instead deploy to any Kubernetes cluster and scale with X number of nodes. Even better if you want to test and make sure all of the deploy settings work properly each time with Terraform but that's my opinion. https://www.digitalocean.com/community/questions/best-practices-to-deploy-docker-on-digitalocean-using-terraform

On Sun, Jul 24, 2022 at 1:22 AM Ram <ram.mullapudi@gmail.com> wrote:
Thank you all for your input. I would like to sign up for a plan which can let us focus only on coding and still scalabile, but my concern is our application requires following:

1. Linux OS
2. Postgres
3. Python 3.10
4. Django latest
5. Vue.js
6. Gunicorn
7. Nginx
8. Let's Encrypt or any SSL
9. Redis
10. Celery
11. Github
12. Jenkins CI/CD
13. Support for API: Stripe, Twillio, Google and etc.

If these can be packaged into a docker image that would be great. I know some of them cannot be in Docker image. I'm planning to check this with both Digital Ocean and Heroku anyway, but I wanted to understand experts advice in this community.

Best regards,
~Ram

On Wed, Jul 13, 2022 at 12:24 AM Abdul Qoyyuum <aqoyyuum@cardaccess.com.au> wrote:
I prefer Heroku and deploying Django as a docker image to Heroku. Less maintenance, worry less about server setups and focus more on code than anything else (i.e. serverless). Start with a hobby plan and if able to get customers, then start paying for scalability features.

On Sunday, July 10, 2022 at 11:21:00 AM UTC+8 ram.mu...@gmail.com wrote:
Hi,

We are planning to launch our application in production once all the testing is completed after deployment to our development server. We are using Jenkins CI automation to deploy the code to the development server and we will do the same in production server too, but we are currently doing a feasibility study to understand which options are good for Django web application for both Web and Mobile app. 

If anyone in this Django users community is currently on any Digital Ocean's production server plan, could you share some details and suggestions.

Best regards,
~Ram

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/be3bb62c-7ce7-47c6-8bc1-80951927712dn%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/C_v8NaMOx4Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F0zneD-%2BmKb8dZcV8iu-5pryw2Yt9djnjJisWr6k381ow%40mail.gmail.com.


--
Abdul Qoyyuum Bin Haji Abdul Kadir
HP No: +673 720 8043

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA3DN%3DW03Tpj%3Dxs61o5cNUCn21bOk2xjXuemArcAG4P0oiChkw%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F0cwjgf7ys8VzuZVdU3Qy6%2BwtoqyZcyx9DS0WkK52DKKQ%40mail.gmail.com.