Re: What is the work of instance & filename which is passing as parameter?

2021-09-11 Thread Hella thor
For Chinese programmers,it's money Tanjina Sharmin 于2021年9月3日周五 下午8:25写道: > def path_and_renamecsv(instance, filename): > upload_to = 'attendancesheet' > ext = filename.split('.')[-1] > # get filename > if instance.pk: > filename = '{}.{}'.format(instance.pk, ext) > else: > # set filename as ran

Who can help me?

2020-08-21 Thread Hella thor
Hey guys: My python version is 3.7.1 Django version is 3.1 When I started the project [image: 9.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-u

Re: Who can help me?

2020-08-21 Thread Hella thor
- Why did he report an error?It's 'Watching for file changes with StatReloader' Ahmed Yasin 于2020年8月21日周五 下午9:38写道: > Can you tell me what are you trying to do? > > On Fri, Aug 21, 2020, 6:29 PM Hella thor > wrote: > >> Hey guys: >> >>

Re: Who can help me?

2020-08-23 Thread Hella thor
> On Sunday, 23 August 2020 at 07:29:51 UTC+5:30 kovy@gmail.com wrote: > >> whats the prob >> >> On Fri, Aug 21, 2020 at 9:30 AM Hella thor wrote: >> >>> Hey guys: >>> >>> My python version is 3.7.1 >>> Django version is 3.1

Re: ConnectionResetError: [Errno 104] Connection reset by peer

2020-08-30 Thread Hella thor
What deployment are you using ? Garrett 于2020年8月31日周一 上午9:16写道: > Hello Django community, > > I'm new to Django, and I recently set up an experimental website using > AWS's Lightsail service. I've got the website working in the sense that I > can access it from any computer with an internet co

Re: DRF question

2022-07-19 Thread Hella thor
Hi Ram 您可以在原来项目的基础上创建新的APP来单独给移动应用程序来使用,并在整体项目完成以后研究是不是需要DRF来兼容。 Lalit Suthar 于2022年7月19日周二 19:04写道: > I would also suggest keeping Django views as it is and writing new views > for your APIs > maybe you can create another file named apiviews.py and then write new > APIs with help of your presen

Re: External Authentication with username in header

2022-07-19 Thread Hella thor
你可以尝试下JWT,在django中使用的话是pyjwt Anh Nguyen 于2022年7月19日周二 23:56写道: > > https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.backends.RemoteUserBackend.configure_user > Django 4.1 now supports ext auth. Never try but hope this helps > > On Tue, 19 Jul 2022 at 22:32 tcouch wrot

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

2022-07-19 Thread Hella thor
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 [image: 0220720104558.p

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

2022-08-01 Thread Hella thor
Thank you Buddy. I've taken care of it. Have a nice day. Thank you aggin. Juergen Hauser 于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',

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

2022-08-01 Thread Hella thor
- 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