Wednesday, August 3, 2022

Re: Generating Calendar files for iPhone and Android with Pthon3/django

icalendar is tried and tested and feature complete. 
OTOH if you want just to serve the iCal files from Google or Apple you don't even need to parse then, just pass them on?

On Tue, 2 Aug 2022 at 15:48, lone...@gmail.com <lonesoac0@gmail.com> wrote:
I found: https://pypi.org/project/icalendar/.  Are there any others out there?

On Tuesday, August 2, 2022 at 10:41:44 AM UTC-4 Ryan Nowakowski wrote:
The standard is called iCal. There are a few different python libraries to choose from.


On August 1, 2022 2:51:34 PM CDT, "lone...@gmail.com" <lone...@gmail.com> wrote:
Hello all,

     I want to generate calendar files for both Android and iPhone.  I do not want to connect to the Google or Apple APIs to do this.  I just want static files that are downloaded from my webapp to the mobile device.  How and can this be done?

Thank you.

--
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/fab30b9f-5afd-459e-9186-f798baedefe5n%40googlegroups.com.


--
Best Regards,

Christian Ledermann

Galway, IE
Mobile : +353 (0) 899748838

https://www.linkedin.com/in/christianledermann
https://github.com/cleder/


<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don't drive species to extinction

2) Don't destroy a habitat that species rely on.

3) Don't change the climate in ways that will result in the above.

}<(((*>

--
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/CABCjzWoiEzdFzg2YRtiW4vz1imGhxJ_ejsz-2Li0AupwCFzT-Q%40mail.gmail.com.

Django security releases issued: 4.0.7 and 3.2.15.

Details are available on the Django project weblog: 



--
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/CAJwKpyRZNynRNTqRnE7HCUpNk0Yh1DRg8UUyDZ%2BzFc0pzpcg9g%40mail.gmail.com.

Tuesday, August 2, 2022

Customize serializer errors with incorrect data

Hi,

I found a way to customize error messages of the serializer by adding extra_kwargs into the serializer meta class.

But, I'm wishing to render custom serializer errors with the incorrect data. For example:

class CreateUserSerializer(serializer.ModelSerializer):
    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'is_active', 'email')

def create_users(request):
    ...
    serialized_data = CreateUserSerializer(data=data, many=True)
    if serialized_data.is_valid():
        serialized_data.save()

Say, afew of the user data has no email information.
This will return error like:

{"email":["This field may not be blank."], "email":["This field may not be blank."], ...}

I want to add error related data or at least index number to error text

Is there a way to do that?

Kind regards,
Sencer HAMARAT

--
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/CACp8TZjwjk6yFAq%2B%3Dw9W6sKeX%3Dg%2Bx8k%3DHJf3bpMpJaOSMqyTAg%40mail.gmail.com.

Re: Generating Calendar files for iPhone and Android with Pthon3/django

I found: https://pypi.org/project/icalendar/.  Are there any others out there?

On Tuesday, August 2, 2022 at 10:41:44 AM UTC-4 Ryan Nowakowski wrote:
The standard is called iCal. There are a few different python libraries to choose from.


On August 1, 2022 2:51:34 PM CDT, "lone...@gmail.com" <lone...@gmail.com> wrote:
Hello all,

     I want to generate calendar files for both Android and iPhone.  I do not want to connect to the Google or Apple APIs to do this.  I just want static files that are downloaded from my webapp to the mobile device.  How and can this be done?

Thank you.

--
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/fab30b9f-5afd-459e-9186-f798baedefe5n%40googlegroups.com.

Re: Generating Calendar files for iPhone and Android with Pthon3/django

The standard is called iCal. There are a few different python libraries to choose from.

On August 1, 2022 2:51:34 PM CDT, "lone...@gmail.com" <lonesoac0@gmail.com> wrote:
Hello all,

     I want to generate calendar files for both Android and iPhone.  I do not want to connect to the Google or Apple APIs to do this.  I just want static files that are downloaded from my webapp to the mobile device.  How and can this be done?

Thank you.

Monday, August 1, 2022

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

Thank you.  I'm already on board.

Satyajit Barik <satyajitbarik.dev@gmail.com> 于2022年8月1日周一 22:26写道:

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.





On Wed, 20 Jul 2022 at 8:18 AM, Hella thor <hellathorchmod777@gmail.com> wrote:
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


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

--
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/36c0e6d2-93aa-4a10-86ba-1de35a9b5e43n%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/CANd-%2BoAuebSZ9hukOtoBh1qTCPH-Zj-F1cg8YCpO6Nt0ihbstA%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/CAAE1PWyz%2Bbt6cGFmcr5KkXixYLa1v5MA9Exw%2BvmjNHu7DC00Zw%40mail.gmail.com.

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

Thank you Buddy.
I've taken care of it.
Have a nice day.
Thank you aggin.

Juergen Hauser <jogibaer99@gmail.com> 于2022年8月1日周一 06:23写道:
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.

--
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/CAAE1PWx5Ez0RPvJQS5gzmhCjfxMK2_%3D9nmiu7dke-ed2hMzPcg%40mail.gmail.com.