Re: Looking Best Learning Resources Python / Django

2022-07-19 Thread Lalit Suthar
https://github.com/lalit97/django-developer-resources

On Tue, 19 Jul 2022 at 21:02, Muneeb Mughal 
wrote:

> I am looking for best learning sources for web and more in django or any
> related framework with complete practice and also lead to job ,
> experience people recommend only .thanks .
>
> --
>
>
>
> *RegardsMuneeb Afzal*
>
> *Cell: +92 333 5646624*
>
> Email: muneeb.afzal...@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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAApwjV1z3Ck6Gpk-xCqcW5Gh2sgXYxHzvRVNUx0uhBJxjT61EA%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGp2JVF4Rv%3D%3DA%3DTBmxoq8PfLpgpKJUf9005OPtWTuRhpa7Hd1w%40mail.gmail.com.


Re: Remote database using ssh

2022-07-19 Thread Abdul Qoyyuum
We don't know if your DB is in the same network or not as your Django App
server but the answer is to open the database port on the database server.
If you're using postgresql on the Database, then install a psql client on
the app server and test connect from there. If it works, then your Django
should also work too.

On Tue, Jul 19, 2022 at 11:32 PM Wennie Catabay 
wrote:

> Hello,
>
> I am stuck on defining how to connect a remote database from another
> server using ssh. I am able to connect the remote database with putty using
> ssh, but but I don't know how to apply it in django.
>
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d0c2f56f-c739-4508-8529-4c5107f08636n%40googlegroups.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA3DN%3DWPXTKCnK9yS56Rd5zR%3Dqh2FPQbz%3D%3Dr85ayQofnLnjLqA%40mail.gmail.com.


Re: Chat app using django

2022-07-19 Thread Abdul Qoyyuum
Hi Lakshyaraj,

Chat app relies on quickly sending data between parties. You will need to
build it with websockets and a redis database to publish and subscribe new
event messages. However, this is basically reinventing the wheel versus
using one that already exists (i.e. Django Channels). But all the best to
you.

On Wed, Jul 20, 2022 at 8:41 AM Lakshyaraj Dash <
dashlakshyaraj2...@gmail.com> wrote:

> Hello guys!
> I'm having a discussion website in django with some sort of user
> authentication and I want to inject chat app with rooms made by the users
> themselves. I don't want any js framework in the frontend. Just tell me how
> to make this type of chat app using django (not Django channels).
>
> Thanks and regards
> Lakshyaraj Dash
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF7qQgD7Ryvnp%2BPp74cs6aogFz32TQiKsH71X3WGcnrPG2FDdQ%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA3DN%3DUDSUnjOQTL%2BmPZn15oVnTPyUpNuG4DyukypVa9z%3DySOA%40mail.gmail.com.


如何在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.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+unsubscr...@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.


Chat app using django

2022-07-19 Thread Lakshyaraj Dash
Hello guys!
I'm having a discussion website in django with some sort of user
authentication and I want to inject chat app with rooms made by the users
themselves. I don't want any js framework in the frontend. Just tell me how
to make this type of chat app using django (not Django channels).

Thanks and regards
Lakshyaraj Dash

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


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  wrote:
>
>> I did something like this recently when I was trying to get a django app
>> to work with Authelia . I found this example
>> using the RemoteUserMiddleware useful:
>> https://github.com/authelia/authelia/commit/8c9ba407f698eacc145e5fbe4e57fc27e7411261
>>
>> On Monday, July 18, 2022 at 2:10:03 PM UTC+1 Ryan Nowakowski wrote:
>>
>>> Middleware is how Django does it.
>>>
>>>
>>> https://docs.djangoproject.com/en/4.0/ref/middleware/#module-django.contrib.auth.middleware
>>>
>>>
>>> On July 15, 2022 4:19:10 PM CDT, Mark Glass  wrote:

 I would like to change the link that opens a Django app. Currently the
 app is launched with GET http://localhost:8000. I would like to
 include a username and password in the header. The header would be
 intercepted somehow (Middleware?) and the user marked as authenticated. The
 app will then launch for the user with a default role.

 This will replace a login page and Django internal authentication.

 Can I implement this using middleware? If so, how?

 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/79a344ad-433f-4390-80d0-5787d2812984n%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKaoNbTvvUxFOc5TsqOez9LFyK9zcWCbiaYw1%2BhWxxRxAbUSZQ%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAE1PWzdCw%3D1dPBy3u1eovbHYwKXBmG4Krso3%2Buk%3DRhcvPVdnQ%40mail.gmail.com.


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 present views
> refer: https://www.django-rest-framework.org/api-guide/views/
>
> On Tue, 19 Jul 2022 at 06:38, Nikhil Chawla 
> wrote:
>
>> Don't clutter the django views with DRF requests. Keep them separate,
>> available at, say `api` endpoints.
>>
>> On Tue, 19 Jul 2022, 06:17 Michael Thomas, 
>> wrote:
>>
>>> Hey Ram,
>>>
>>> I'm afraid no one can answer your questions without knowing your code,
>>> how it works, or anything else...
>>>
>>> Broadly speaking, here's how we approached a similar scenario:
>>>
>>> 1) Created one or more Serializer for each model that required
>>> interaction via API. Some models required more than one, as they were
>>> either too large for list() operations, or required a simpler
>>> representation when nested into another Serializer, etc..
>>> 2) Created custom permissions to check if users were allowed to perform
>>> the action(s) they were trying to make
>>> 3) Created ViewSets using the permissions and serializers mentioned
>>> above, as well as any additional actions that didn't fit within the normal
>>> REST verbs
>>> 4) Created a router and registered the viewsets with it
>>> 5) Added the router's urls into the projects url configuration
>>>
>>> I hope that's useful :)
>>>
>>> Kind Regards,
>>> Michael Thomas
>>>
>>> On Tue, Jul 19, 2022 at 7:21 AM Ram  wrote:
>>>
 Hi,

 We completed coding all the features without DRF for our web site and
 now we are planning to develop a mobile app for the same website by keeping
 the web site as it is and develop a mobile app using Flutter.

 Based on our understanding, we have do the following in the current
 code for adding REST APIs


1. We have to create serializers.py for each model in each App that
we have
2. We need to add a few lines of code in views.py
3. We think we don't have to modify the UI template by using json
response from DRF ( Is this really necessary because we are not changing
anything in the website UI)

 Please correct me if I'm wrong about the above 3 points or do we need
 to do any additional things?

 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CA%2BOi5F2wgTLXQFreQp9cXNGBOnTqoAQ6vA5CqZuBNeya%2BWKLXg%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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAEdx1fo_Zk7H7nFMgUSYkfTC_p_cV8Qa8W17C_GHnDDwdk2eBw%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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAEO4UakHjqtO3S-DZ-9A_-C7ZMoEBiNxtGm1eGL-R1cp9Ofutw%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGp2JVHC8SFuiJ7g7pnb4xEZz70O1-auE%3DUr0NGGG4AamJNUzw%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+unsubscr...@googlegroups.com.
To view this 

Re: Remote database using ssh

2022-07-19 Thread Sebastian Jung
Hey,

This is easy and have nothing to do with django. Yoz must make port
forwarding over ssh from postgres port.

https://superuser.com/questions/1213886/how-to-open-port-via-ssh-tunnel

Regards

Wennie Catabay  schrieb am Di., 19. Juli 2022,
17:32:

> Hello,
>
> I am stuck on defining how to connect a remote database from another
> server using ssh. I am able to connect the remote database with putty using
> ssh, but but I don't know how to apply it in django.
>
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d0c2f56f-c739-4508-8529-4c5107f08636n%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKGT9my5bZyH_FV%2BpvoHOwHpWrwgB%2BTU%3DNjXm3%2Bnum4tvt_N8Q%40mail.gmail.com.


Re: Remote database using ssh

2022-07-19 Thread Mr.Teapot
Probably your database is not listening for remote connections for security 
reasons. Do the database and your application server are in the same 
network? Or maybe you are able to set up a VPN for both of these machines. 
Last but not recommended solution you can open a public port and allow only 
specyfic IP to connect and change the database settings to listen not only 
for local connections.
wtorek, 19 lipca 2022 o 17:50:52 UTC+2 bboy...@gmail.com napisał(a):

> Public db port but not recommend for security reason and performance.
>
> On Tue, 19 Jul 2022 at 22:32 Wennie Catabay  wrote:
>
>> Hello,
>>
>> I am stuck on defining how to connect a remote database from another 
>> server using ssh. I am able to connect the remote database with putty using 
>> ssh, but but I don't know how to apply it in django.
>>
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/d0c2f56f-c739-4508-8529-4c5107f08636n%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f38a890e-db5d-45a8-a616-16443e9130e5n%40googlegroups.com.


Re: Url mapping error.

2022-07-19 Thread Wazed Khan
*Installed apps

On Tue, Jul 19, 2022, 10:05 PM Wazed Khan  wrote:

> Did you registered your app in instead app in project setting
>
> On Tue, Jul 19, 2022, 9:32 PM Abdulrahman Hayat <
> elhayatusman1...@gmail.com> wrote:
>
>> After writing basic script and did all the necessary url mappings, i
>> tried running manage.py and i keep on getting "The included URLconf
>> '> '/home/kali/django-projects/testpage/calc/urls.py'>' does not appear to
>> have any patterns in it. If you see valid patterns in the file then the
>> issue is probably caused by a circular import."
>> NB my project name is CALC.
>> [image: Screenshot_2022-07-19_09-45-03.png][image:
>> Screenshot_2022-07-19_09-45-59.png]
>>
>> THANKS TEAM..
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/49532b32-c8b2-4629-80cc-2d7451275a24n%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALWCTKj86cdsQEpw8EhbUNjTbz97cggWz0w7%3D%2Bf6Rw8mn6oC%3DA%40mail.gmail.com.


Re: External Authentication with username in header

2022-07-19 Thread Anh Nguyen
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  wrote:

> I did something like this recently when I was trying to get a django app
> to work with Authelia . I found this example
> using the RemoteUserMiddleware useful:
> https://github.com/authelia/authelia/commit/8c9ba407f698eacc145e5fbe4e57fc27e7411261
>
> On Monday, July 18, 2022 at 2:10:03 PM UTC+1 Ryan Nowakowski wrote:
>
>> Middleware is how Django does it.
>>
>>
>> https://docs.djangoproject.com/en/4.0/ref/middleware/#module-django.contrib.auth.middleware
>>
>>
>> On July 15, 2022 4:19:10 PM CDT, Mark Glass  wrote:
>>>
>>> I would like to change the link that opens a Django app. Currently the
>>> app is launched with GET http://localhost:8000. I would like to include
>>> a username and password in the header. The header would be intercepted
>>> somehow (Middleware?) and the user marked as authenticated. The app will
>>> then launch for the user with a default role.
>>>
>>> This will replace a login page and Django internal authentication.
>>>
>>> Can I implement this using middleware? If so, how?
>>>
>>> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/79a344ad-433f-4390-80d0-5787d2812984n%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKaoNbTvvUxFOc5TsqOez9LFyK9zcWCbiaYw1%2BhWxxRxAbUSZQ%40mail.gmail.com.


Re: Remote database using ssh

2022-07-19 Thread Anh Nguyen
Public db port but not recommend for security reason and performance.

On Tue, 19 Jul 2022 at 22:32 Wennie Catabay  wrote:

> Hello,
>
> I am stuck on defining how to connect a remote database from another
> server using ssh. I am able to connect the remote database with putty using
> ssh, but but I don't know how to apply it in django.
>
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d0c2f56f-c739-4508-8529-4c5107f08636n%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKaoNbQX6vd0jxVXycJzfOFQCo7t%3Dt887TWs1yduJR7acYykOg%40mail.gmail.com.


Looking Best Learning Resources Python / Django

2022-07-19 Thread Muneeb Mughal
I am looking for best learning sources for web and more in django or any
related framework with complete practice and also lead to job ,
experience people recommend only .thanks .

-- 



*RegardsMuneeb Afzal*

*Cell: +92 333 5646624*

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


Remote database using ssh

2022-07-19 Thread Wennie Catabay
Hello,

I am stuck on defining how to connect a remote database from another server 
using ssh. I am able to connect the remote database with putty using ssh, 
but but I don't know how to apply it in django.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d0c2f56f-c739-4508-8529-4c5107f08636n%40googlegroups.com.


Re: External Authentication with username in header

2022-07-19 Thread tcouch
I did something like this recently when I was trying to get a django app to 
work with Authelia . I found this example using 
the RemoteUserMiddleware 
useful: 
https://github.com/authelia/authelia/commit/8c9ba407f698eacc145e5fbe4e57fc27e7411261

On Monday, July 18, 2022 at 2:10:03 PM UTC+1 Ryan Nowakowski wrote:

> Middleware is how Django does it.
>
>
> https://docs.djangoproject.com/en/4.0/ref/middleware/#module-django.contrib.auth.middleware
>
>
> On July 15, 2022 4:19:10 PM CDT, Mark Glass  wrote:
>>
>> I would like to change the link that opens a Django app. Currently the 
>> app is launched with GET http://localhost:8000. I would like to include 
>> a username and password in the header. The header would be intercepted 
>> somehow (Middleware?) and the user marked as authenticated. The app will 
>> then launch for the user with a default role.
>>
>> This will replace a login page and Django internal authentication. 
>>
>> Can I implement this using middleware? If so, how?
>>
>> 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/79a344ad-433f-4390-80d0-5787d2812984n%40googlegroups.com.


Re: Django GDAL problem in M1 Chip Pro

2022-07-19 Thread 'Kasper Laudrup' via Django users
On 18 July 2022 18.46.07 CEST, Chandra Prakash Choubey 
 wrote:
>Noting is in the content.
>

Considering you didn't actually ask a question I don't know which kind of 
response you were hoping for.

At least you got a fast response. Seemed like that was important to you.

If you want a useful response on the other hand, consider writing a question 
someone can actually answer.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7057D452-0638-4A63-B270-6367382529AC%40stacktrace.dk.


Re: DRF question

2022-07-19 Thread Lalit Suthar
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 present views
refer: https://www.django-rest-framework.org/api-guide/views/

On Tue, 19 Jul 2022 at 06:38, Nikhil Chawla 
wrote:

> Don't clutter the django views with DRF requests. Keep them separate,
> available at, say `api` endpoints.
>
> On Tue, 19 Jul 2022, 06:17 Michael Thomas, 
> wrote:
>
>> Hey Ram,
>>
>> I'm afraid no one can answer your questions without knowing your code,
>> how it works, or anything else...
>>
>> Broadly speaking, here's how we approached a similar scenario:
>>
>> 1) Created one or more Serializer for each model that required
>> interaction via API. Some models required more than one, as they were
>> either too large for list() operations, or required a simpler
>> representation when nested into another Serializer, etc..
>> 2) Created custom permissions to check if users were allowed to perform
>> the action(s) they were trying to make
>> 3) Created ViewSets using the permissions and serializers mentioned
>> above, as well as any additional actions that didn't fit within the normal
>> REST verbs
>> 4) Created a router and registered the viewsets with it
>> 5) Added the router's urls into the projects url configuration
>>
>> I hope that's useful :)
>>
>> Kind Regards,
>> Michael Thomas
>>
>> On Tue, Jul 19, 2022 at 7:21 AM Ram  wrote:
>>
>>> Hi,
>>>
>>> We completed coding all the features without DRF for our web site and
>>> now we are planning to develop a mobile app for the same website by keeping
>>> the web site as it is and develop a mobile app using Flutter.
>>>
>>> Based on our understanding, we have do the following in the current code
>>> for adding REST APIs
>>>
>>>
>>>1. We have to create serializers.py for each model in each App that
>>>we have
>>>2. We need to add a few lines of code in views.py
>>>3. We think we don't have to modify the UI template by using json
>>>response from DRF ( Is this really necessary because we are not changing
>>>anything in the website UI)
>>>
>>> Please correct me if I'm wrong about the above 3 points or do we need to
>>> do any additional things?
>>>
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CA%2BOi5F2wgTLXQFreQp9cXNGBOnTqoAQ6vA5CqZuBNeya%2BWKLXg%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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAEdx1fo_Zk7H7nFMgUSYkfTC_p_cV8Qa8W17C_GHnDDwdk2eBw%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEO4UakHjqtO3S-DZ-9A_-C7ZMoEBiNxtGm1eGL-R1cp9Ofutw%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGp2JVHC8SFuiJ7g7pnb4xEZz70O1-auE%3DUr0NGGG4AamJNUzw%40mail.gmail.com.


Django 4.1 release candidate 1 released

2022-07-19 Thread Carlton Gibson
Details are available on the Django project weblog:

https://www.djangoproject.com/weblog/2022/jul/19/django-41-rc1/

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