Re: Question on migrations vs postgres database

2020-06-12 Thread Integr@te System
Hi Ram,

Plz check line #44 in reset_migrations.py
try replace square bracket by percent sign.

Or check temp file before your actions execute commands migration.

Goodluck.

On Sat, Jun 13, 2020, 12:31 PM Ram  wrote:

> Hi,
>
> We clone our project repository from GIT hub and deployed our web
> application in our development server in the past. The application was
> working fine in the past. Now we merged our new features into the same
> repository which has new models in our models.py. When we merged the
> changes into the development server, we tried running these commands
>
> 1. python3 manage.py makemigrations
>> < no changes detected >
>> 2. python3 manage.py migrate
>> < no migrations to apply >
>> 3. python3 manage.py reset_migrations
>> < all the migrations are created fine including new tables >
>>
>
>  But the issue is Postgres database does not show 2 of those new tables
> and we are not able to find any clue in the postgres database logs other
> than these log lines.
>
> 2020-06-13 02:48:34.627 UTC [7463] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist
>> ..
>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist at character 35
>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v STATEMENT:  SELECT
>> COUNT(*) AS "__count" FROM "pages_rim_classifieds_messages" WHERE
>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>> "pages_rim_classifieds_messages"."flag" = 'u')
>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist at character 475
>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v STATEMENT:  SELECT
>> "pages_rim_classifieds_messages"."id",
>> "pages_rim_classifieds_messages"."adv_id",
>> "pages_rim_classifieds_messages"."message",
>> "pages_rim_classifieds_messages"."username",
>> "pages_rim_classifieds_messages"."flag",
>> "pages_rim_classifieds_messages"."status",
>> "pages_rim_classifieds_messages"."addedon",
>> "pages_rim_classifieds_messages"."From",
>> "pages_rim_classifieds_messages"."To",
>> "pages_rim_classifieds_messages"."ttle",
>> "pages_rim_classifieds_messages"."delete" FROM
>> "pages_rim_classifieds_messages" WHERE
>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>> "pages_rim_classifieds_messages"."flag" = 'u') LIMIT 21
>>
>>
> I appreciate if someone can give us some clue if we are missing anything?
>
> 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%2BOi5F0rWEhv9c%3Dc9q_%3D6qwUAFuLwRHVc1sPBTjtKbtkHpuoBQ%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/CAP5HUWqm-XF3mnzxrf8-j7BVt1zjDbx1qsot5%2BkjNrDxXAf7kw%40mail.gmail.com.


Question on migrations vs postgres database

2020-06-12 Thread Ram
Hi,

We clone our project repository from GIT hub and deployed our web
application in our development server in the past. The application was
working fine in the past. Now we merged our new features into the same
repository which has new models in our models.py. When we merged the
changes into the development server, we tried running these commands

1. python3 manage.py makemigrations
> < no changes detected >
> 2. python3 manage.py migrate
> < no migrations to apply >
> 3. python3 manage.py reset_migrations
> < all the migrations are created fine including new tables >
>

 But the issue is Postgres database does not show 2 of those new tables and
we are not able to find any clue in the postgres database logs other than
these log lines.

2020-06-13 02:48:34.627 UTC [7463] vxxx@v ERROR:  relation
> "pages_rim_classifieds_messages" does not exist
> ..
> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v ERROR:  relation
> "pages_rim_classifieds_messages" does not exist at character 35
> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v STATEMENT:  SELECT
> COUNT(*) AS "__count" FROM "pages_rim_classifieds_messages" WHERE
> ("pages_rim_classifieds_messages"."To" IS NULL AND
> "pages_rim_classifieds_messages"."flag" = 'u')
> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v ERROR:  relation
> "pages_rim_classifieds_messages" does not exist at character 475
> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v STATEMENT:  SELECT
> "pages_rim_classifieds_messages"."id",
> "pages_rim_classifieds_messages"."adv_id",
> "pages_rim_classifieds_messages"."message",
> "pages_rim_classifieds_messages"."username",
> "pages_rim_classifieds_messages"."flag",
> "pages_rim_classifieds_messages"."status",
> "pages_rim_classifieds_messages"."addedon",
> "pages_rim_classifieds_messages"."From",
> "pages_rim_classifieds_messages"."To",
> "pages_rim_classifieds_messages"."ttle",
> "pages_rim_classifieds_messages"."delete" FROM
> "pages_rim_classifieds_messages" WHERE
> ("pages_rim_classifieds_messages"."To" IS NULL AND
> "pages_rim_classifieds_messages"."flag" = 'u') LIMIT 21
>
>
I appreciate if someone can give us some clue if we are missing anything?

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%2BOi5F0rWEhv9c%3Dc9q_%3D6qwUAFuLwRHVc1sPBTjtKbtkHpuoBQ%40mail.gmail.com.


Re: Realtime reading data

2020-06-12 Thread karan rathore
You can use Django Channels and use WebSockets to connect. Also, you can
integrate Django Channels with MQTT protocol

On Fri, Jun 12, 2020 at 5:52 PM Sonia Ayachi 
wrote:

> how python / django can read the state of a sensor in real time? I would
> like to read the state of my PIR sensor in real time with python . Ajax
> does not work . Is there any solution ?
>
> --
> 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/CAMLH%2Bfe%3D69R%3DnVDjnJSRP1N1x_K96j12Afs39TVrrzK1CQGM-w%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/CAPuQCJU5w9jr%2B8bXDnCqzNduez9jC-ojaGVXj2mU-vQdifg8HQ%40mail.gmail.com.


Re: Best Django Rest Framework Tutorial??????

2020-06-12 Thread Siratim Mustaquim
@chaitanya orakala
Why are you looking for the best one! that's a wrong search term,
If u want to understand thoroughly: go through the documentation of REST
and Django-REST
if u are having trouble implementing: watch any youtube video along with
the Documentation
if you are  in a tight schedule: Just watch a blog post abt Django-REST

Happy Coding!


-
S. M. Siratim Mustaquim

Find me in :  *GitHub   *|  *Behance
 * |   DeviantArt
  | *LinkedIn
 |  Gist
 *


On Sat, Jun 13, 2020 at 10:34 AM akshatization . 
wrote:

> Hello,
>
> IMO there is nothing better than Django rest framework's official
> documentation.
> It clearly explains every concept pretty neatly.
>
> Thanks
>
> On Sat, Jun 13, 2020, 7:01 AM Samuel Nogueira 
> wrote:
>
>> Hi!
>>
>> In my personal exprience i’ve been learning throught a udemy course, and
>> it helped me a lot. Maybe it will not be usefull to you since the language
>> is portuguese, but i’m sure you can find some in english or your native
>> language
>>
>>
>>
>> Enviado do Email  para
>> Windows 10
>>
>>
>>
>> *De: *David Zea 
>> *Enviado:*sexta-feira, 12 de junho de 2020 21:44
>> *Para: *django-users@googlegroups.com
>> *Assunto: *Re: Best Django Rest Framework Tutorial??
>>
>>
>>
>> Hola, este es un tutorial en la pagina oficial de REST.
>>
>> Hi, this is a tutorial on official page of REST.
>>
>> https://www.django-rest-framework.org/tutorial/1-serialization/
>>
>>
>>
>> El vie., 12 jun. 2020 a las 17:43, chaitanya orakala (<
>> chaitu.orak...@gmail.com>) escribió:
>>
>> Thank You guys..
>>
>>
>>
>> On Fri, Jun 12, 2020 at 4:18 PM Rupesh Dahal  wrote:
>>
>> I would suggest the DRF documentation itself.
>>
>>
>>
>> On Thu, Jun 11, 2020 at 8:12 PM chalist 
>> wrote:
>>
>> I like this channel. Maybe you like, too:
>>
>>
>>
>> https://www.youtube.com/watch?v=XMu0T6L2KRQ
>>
>>
>>
>> On Thu, 11 Jun 2020 at 15:04, Mohamed SAMAKE 
>> wrote:
>>
>> https://agiliq.com/blog/2019/04/drf-polls/
>>
>>
>>
>> Le mer. 10 juin 2020 à 20:07, chaitanya orakala 
>> a écrit :
>>
>> which is best among all those channels
>>
>> ?
>>
>>
>>
>> On Wed, Jun 10, 2020 at 3:59 PM cosmos multi 
>> wrote:
>>
>> on youtube there are very good
>>
>>
>>
>> El mié., 10 jun. 2020 a las 14:40, chaitanya orakala (<
>> chaitu.orak...@gmail.com>) escribió:
>>
>> Thank you jacklin
>>
>>
>>
>>
>>
>> On Wed, Jun 10, 2020 at 3:00 PM Jack Lin  wrote:
>>
>> DOCUMENTATION
>>
>>
>>
>>
>>
>> 在 2020年6月11日 於 上午2:58:42, chaitanya orakala (chaitu.orak...@gmail.com) 寫下
>> :
>>
>> can anyone please respond ??
>>
>>
>>
>> On Wed, Jun 10, 2020 at 9:51 AM Sai  wrote:
>>
>> Hi djangoians,
>> I want to learn django rest framework, may i please know which is best
>> resource in online market or any youtube links or udemy courses???
>>
>> Thanks in advance.
>>
>> --
>> 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/d8b89181-f0d9-4ee8-9f79-dedec63738d2o%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/CAPcTzRYC7UgBAE%3Dm47w74w7kx7JQEtt3ZGZ1naV%2B1tr4jiicYw%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/CAP7OQq11pVJOX6j6fZRHki2YVNiFE8w_yF_BAeFaCGf_mEhZdQ%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/CAPcTzRameZyEwswkSEvgn_tx

Re: Best Django Rest Framework Tutorial??????

2020-06-12 Thread akshatization .
Hello,

IMO there is nothing better than Django rest framework's official
documentation.
It clearly explains every concept pretty neatly.

Thanks

On Sat, Jun 13, 2020, 7:01 AM Samuel Nogueira  wrote:

> Hi!
>
> In my personal exprience i’ve been learning throught a udemy course, and
> it helped me a lot. Maybe it will not be usefull to you since the language
> is portuguese, but i’m sure you can find some in english or your native
> language
>
>
>
> Enviado do Email  para
> Windows 10
>
>
>
> *De: *David Zea 
> *Enviado:*sexta-feira, 12 de junho de 2020 21:44
> *Para: *django-users@googlegroups.com
> *Assunto: *Re: Best Django Rest Framework Tutorial??
>
>
>
> Hola, este es un tutorial en la pagina oficial de REST.
>
> Hi, this is a tutorial on official page of REST.
>
> https://www.django-rest-framework.org/tutorial/1-serialization/
>
>
>
> El vie., 12 jun. 2020 a las 17:43, chaitanya orakala (<
> chaitu.orak...@gmail.com>) escribió:
>
> Thank You guys..
>
>
>
> On Fri, Jun 12, 2020 at 4:18 PM Rupesh Dahal  wrote:
>
> I would suggest the DRF documentation itself.
>
>
>
> On Thu, Jun 11, 2020 at 8:12 PM chalist  wrote:
>
> I like this channel. Maybe you like, too:
>
>
>
> https://www.youtube.com/watch?v=XMu0T6L2KRQ
>
>
>
> On Thu, 11 Jun 2020 at 15:04, Mohamed SAMAKE 
> wrote:
>
> https://agiliq.com/blog/2019/04/drf-polls/
>
>
>
> Le mer. 10 juin 2020 à 20:07, chaitanya orakala 
> a écrit :
>
> which is best among all those channels
>
> ?
>
>
>
> On Wed, Jun 10, 2020 at 3:59 PM cosmos multi 
> wrote:
>
> on youtube there are very good
>
>
>
> El mié., 10 jun. 2020 a las 14:40, chaitanya orakala (<
> chaitu.orak...@gmail.com>) escribió:
>
> Thank you jacklin
>
>
>
>
>
> On Wed, Jun 10, 2020 at 3:00 PM Jack Lin  wrote:
>
> DOCUMENTATION
>
>
>
>
>
> 在 2020年6月11日 於 上午2:58:42, chaitanya orakala (chaitu.orak...@gmail.com) 寫下:
>
> can anyone please respond ??
>
>
>
> On Wed, Jun 10, 2020 at 9:51 AM Sai  wrote:
>
> Hi djangoians,
> I want to learn django rest framework, may i please know which is best
> resource in online market or any youtube links or udemy courses???
>
> Thanks in advance.
>
> --
> 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/d8b89181-f0d9-4ee8-9f79-dedec63738d2o%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/CAPcTzRYC7UgBAE%3Dm47w74w7kx7JQEtt3ZGZ1naV%2B1tr4jiicYw%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/CAP7OQq11pVJOX6j6fZRHki2YVNiFE8w_yF_BAeFaCGf_mEhZdQ%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/CAPcTzRameZyEwswkSEvgn_txzHYnir-q%2B80SjeKxDSrqmotPVA%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/CA%2Bt%2BYr3m5wAivA4hL3QX%2B9hTWTEB%3Ddiz-%2B8B8NSkQyKSnqQ%3DnA%40mail.gmail.com
> 
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and

RES: Best Django Rest Framework Tutorial??????

2020-06-12 Thread Samuel Nogueira
Hi!In my personal exprience i’ve been learning throught a udemy course, and it helped me a lot. Maybe it will not be usefull to you since the language is portuguese, but i’m sure you can find some in english or your native language Enviado do Email para Windows 10 De: David ZeaEnviado:sexta-feira, 12 de junho de 2020 21:44Para: django-users@googlegroups.comAssunto: Re: Best Django Rest Framework Tutorial?? Hola, este es un tutorial en la pagina oficial de REST.Hi, this is a tutorial on official page of REST.https://www.django-rest-framework.org/tutorial/1-serialization/   El vie., 12 jun. 2020 a las 17:43, chaitanya orakala () escribió:Thank You guys.. On Fri, Jun 12, 2020 at 4:18 PM Rupesh Dahal  wrote:I would suggest the DRF documentation itself. On Thu, Jun 11, 2020 at 8:12 PM chalist  wrote:I like this channel. Maybe you like, too: https://www.youtube.com/watch?v=XMu0T6L2KRQ  On Thu, 11 Jun 2020 at 15:04, Mohamed SAMAKE  wrote:https://agiliq.com/blog/2019/04/drf-polls/ Le mer. 10 juin 2020 à 20:07, chaitanya orakala  a écrit :which is best among all those channels? On Wed, Jun 10, 2020 at 3:59 PM cosmos multi  wrote:on youtube there are very good El mié., 10 jun. 2020 a las 14:40, chaitanya orakala () escribió:Thank you jacklin  On Wed, Jun 10, 2020 at 3:00 PM Jack Lin  wrote:DOCUMENTATION  在 2020年6月11日 於 上午2:58:42, chaitanya orakala (chaitu.orak...@gmail.com) 寫下:can anyone please respond ?? On Wed, Jun 10, 2020 at 9:51 AM Sai  wrote:Hi djangoians,I want to learn django rest framework, may i please know which is best resource in online market or any youtube links or udemy courses???Thanks in advance.-- 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/d8b89181-f0d9-4ee8-9f79-dedec63738d2o%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/CAPcTzRYC7UgBAE%3Dm47w74w7kx7JQEtt3ZGZ1naV%2B1tr4jiicYw%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/CAP7OQq11pVJOX6j6fZRHki2YVNiFE8w_yF_BAeFaCGf_mEhZdQ%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/CAPcTzRameZyEwswkSEvgn_txzHYnir-q%2B80SjeKxDSrqmotPVA%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/CA%2Bt%2BYr3m5wAivA4hL3QX%2B9hTWTEB%3Ddiz-%2B8B8NSkQyKSnqQ%3DnA%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/CAPcTzRZbe3pxoGycbce18ykxbs9R18CEn7hybe%3DjxFHgDBYe5g%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/CAPVtpYiTieo-n9FJVN5ExxhO%2Bs5ocE3mXf8ksT1BaOyBmrLqrQ%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/CAEUFy_2%2BFSUvKRNcqfJD7NEBXeur1i%2BHip0LbYB4yzQqmF0EPg%40mail.gmail.com.-- You received this

Re: Django, GraphQL and React Native

2020-06-12 Thread Walid Kambagha
Is the error occur when using emulator or real device?

On Sat, 13 Jun 2020 at 01:43, ADEWALE ADISA  wrote:

> can you show your graphene code ?
>
> On Fri, 12 Jun 2020, 15:39 ndifreke umoren, 
> wrote:
>
>> @Waled thanks for your response. That's exactly what I did but I keep
>> having no data sent back. I tested my API with graphiql and it works
>> perfectly but on React Native, I keep getting "Network Error: Network
>> failed" error. I'd love all the help I can get solving this problem. Thanks.
>>
>> On Friday, June 12, 2020 at 12:56:34 AM UTC+1, Walid Kambagha wrote:
>>>
>>> You can use Apollo the same way you’d use with React to connect to the
>>> API.
>>>
>>> On Thu, 11 Jun 2020 at 22:21, ndifreke umoren 
>>> wrote:
>>>
 Hello everyone. I am working on a React Native mobile app with a
 GraphQL endpoint I built using Python Django. Please I need help connecting
 the API with the client.

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/250b31a2-b276-4d75-a93a-b1e004491e55o%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/0e4decb3-7f78-466f-96ac-8d01f474b3f7o%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/CAMGzuy_BB_N6ypuCwQwpGHCwT%2BCsCGK8JWroENZtd2_Wj6mycA%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/CAGbq8nkfqR3sDPBks_c-H82xiFs6oB3%2Bu_dcGdqZnx22eBECkQ%40mail.gmail.com.


Re: Best Django Rest Framework Tutorial??????

2020-06-12 Thread David Zea
Hola, este es un tutorial en la pagina oficial de REST.
Hi, this is a tutorial on official page of REST.
https://www.django-rest-framework.org/tutorial/1-serialization/

El vie., 12 jun. 2020 a las 17:43, chaitanya orakala (<
chaitu.orak...@gmail.com>) escribió:

> Thank You guys...
>
> On Fri, Jun 12, 2020 at 4:18 PM Rupesh Dahal  wrote:
>
>> I would suggest the DRF documentation itself.
>>
>> On Thu, Jun 11, 2020 at 8:12 PM chalist 
>> wrote:
>>
>>> I like this channel. Maybe you like, too:
>>>
>>> https://www.youtube.com/watch?v=XMu0T6L2KRQ
>>>
>>> On Thu, 11 Jun 2020 at 15:04, Mohamed SAMAKE 
>>> wrote:
>>>
 https://agiliq.com/blog/2019/04/drf-polls/

 Le mer. 10 juin 2020 à 20:07, chaitanya orakala <
 chaitu.orak...@gmail.com> a écrit :

> which is best among all those channels
> ?
>
> On Wed, Jun 10, 2020 at 3:59 PM cosmos multi 
> wrote:
>
>> on youtube there are very good
>>
>> El mié., 10 jun. 2020 a las 14:40, chaitanya orakala (<
>> chaitu.orak...@gmail.com>) escribió:
>>
>>> Thank you jacklin
>>>
>>>
>>> On Wed, Jun 10, 2020 at 3:00 PM Jack Lin  wrote:
>>>
 DOCUMENTATION


 在 2020年6月11日 於 上午2:58:42, chaitanya orakala (
 chaitu.orak...@gmail.com) 寫下:

 can anyone please respond ??

 On Wed, Jun 10, 2020 at 9:51 AM Sai 
 wrote:

> Hi djangoians,
> I want to learn django rest framework, may i please know which is
> best resource in online market or any youtube links or udemy 
> courses???
>
> Thanks in advance.
>
> --
> 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/d8b89181-f0d9-4ee8-9f79-dedec63738d2o%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/CAPcTzRYC7UgBAE%3Dm47w74w7kx7JQEtt3ZGZ1naV%2B1tr4jiicYw%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/CAP7OQq11pVJOX6j6fZRHki2YVNiFE8w_yF_BAeFaCGf_mEhZdQ%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/CAPcTzRameZyEwswkSEvgn_txzHYnir-q%2B80SjeKxDSrqmotPVA%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/CA%2Bt%2BYr3m5wAivA4hL3QX%2B9hTWTEB%3Ddiz-%2B8B8NSkQyKSnqQ%3DnA%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://group

Re: Django, GraphQL and React Native

2020-06-12 Thread ADEWALE ADISA
can you show your graphene code ?

On Fri, 12 Jun 2020, 15:39 ndifreke umoren,  wrote:

> @Waled thanks for your response. That's exactly what I did but I keep
> having no data sent back. I tested my API with graphiql and it works
> perfectly but on React Native, I keep getting "Network Error: Network
> failed" error. I'd love all the help I can get solving this problem. Thanks.
>
> On Friday, June 12, 2020 at 12:56:34 AM UTC+1, Walid Kambagha wrote:
>>
>> You can use Apollo the same way you’d use with React to connect to the
>> API.
>>
>> On Thu, 11 Jun 2020 at 22:21, ndifreke umoren 
>> wrote:
>>
>>> Hello everyone. I am working on a React Native mobile app with a GraphQL
>>> endpoint I built using Python Django. Please I need help connecting the API
>>> with the client.
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/250b31a2-b276-4d75-a93a-b1e004491e55o%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/0e4decb3-7f78-466f-96ac-8d01f474b3f7o%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/CAMGzuy_BB_N6ypuCwQwpGHCwT%2BCsCGK8JWroENZtd2_Wj6mycA%40mail.gmail.com.


Re: Best Django Rest Framework Tutorial??????

2020-06-12 Thread chaitanya orakala
Thank You guys...

On Fri, Jun 12, 2020 at 4:18 PM Rupesh Dahal  wrote:

> I would suggest the DRF documentation itself.
>
> On Thu, Jun 11, 2020 at 8:12 PM chalist  wrote:
>
>> I like this channel. Maybe you like, too:
>>
>> https://www.youtube.com/watch?v=XMu0T6L2KRQ
>>
>> On Thu, 11 Jun 2020 at 15:04, Mohamed SAMAKE 
>> wrote:
>>
>>> https://agiliq.com/blog/2019/04/drf-polls/
>>>
>>> Le mer. 10 juin 2020 à 20:07, chaitanya orakala <
>>> chaitu.orak...@gmail.com> a écrit :
>>>
 which is best among all those channels
 ?

 On Wed, Jun 10, 2020 at 3:59 PM cosmos multi 
 wrote:

> on youtube there are very good
>
> El mié., 10 jun. 2020 a las 14:40, chaitanya orakala (<
> chaitu.orak...@gmail.com>) escribió:
>
>> Thank you jacklin
>>
>>
>> On Wed, Jun 10, 2020 at 3:00 PM Jack Lin  wrote:
>>
>>> DOCUMENTATION
>>>
>>>
>>> 在 2020年6月11日 於 上午2:58:42, chaitanya orakala (
>>> chaitu.orak...@gmail.com) 寫下:
>>>
>>> can anyone please respond ??
>>>
>>> On Wed, Jun 10, 2020 at 9:51 AM Sai 
>>> wrote:
>>>
 Hi djangoians,
 I want to learn django rest framework, may i please know which is
 best resource in online market or any youtube links or udemy courses???

 Thanks in advance.

 --
 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/d8b89181-f0d9-4ee8-9f79-dedec63738d2o%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/CAPcTzRYC7UgBAE%3Dm47w74w7kx7JQEtt3ZGZ1naV%2B1tr4jiicYw%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/CAP7OQq11pVJOX6j6fZRHki2YVNiFE8w_yF_BAeFaCGf_mEhZdQ%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/CAPcTzRameZyEwswkSEvgn_txzHYnir-q%2B80SjeKxDSrqmotPVA%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/CA%2Bt%2BYr3m5wAivA4hL3QX%2B9hTWTEB%3Ddiz-%2B8B8NSkQyKSnqQ%3DnA%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/CAPcTzRZbe3pxoGycbce18ykxbs9R18CEn7hybe%3DjxFHgDBYe5g%40mail.gmail.com
 
 .

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>

Re: Collapsible list menu with Django

2020-06-12 Thread Luciano Martins
Search by crispy 

-- 
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/e2185ead-d4b4-48ec-8698-11185f7fb79fo%40googlegroups.com.


Re: Best Django Rest Framework Tutorial??????

2020-06-12 Thread Rupesh Dahal
I would suggest the DRF documentation itself.

On Thu, Jun 11, 2020 at 8:12 PM chalist  wrote:

> I like this channel. Maybe you like, too:
>
> https://www.youtube.com/watch?v=XMu0T6L2KRQ
>
> On Thu, 11 Jun 2020 at 15:04, Mohamed SAMAKE 
> wrote:
>
>> https://agiliq.com/blog/2019/04/drf-polls/
>>
>> Le mer. 10 juin 2020 à 20:07, chaitanya orakala 
>> a écrit :
>>
>>> which is best among all those channels
>>> ?
>>>
>>> On Wed, Jun 10, 2020 at 3:59 PM cosmos multi 
>>> wrote:
>>>
 on youtube there are very good

 El mié., 10 jun. 2020 a las 14:40, chaitanya orakala (<
 chaitu.orak...@gmail.com>) escribió:

> Thank you jacklin
>
>
> On Wed, Jun 10, 2020 at 3:00 PM Jack Lin  wrote:
>
>> DOCUMENTATION
>>
>>
>> 在 2020年6月11日 於 上午2:58:42, chaitanya orakala (chaitu.orak...@gmail.com)
>> 寫下:
>>
>> can anyone please respond ??
>>
>> On Wed, Jun 10, 2020 at 9:51 AM Sai  wrote:
>>
>>> Hi djangoians,
>>> I want to learn django rest framework, may i please know which is
>>> best resource in online market or any youtube links or udemy courses???
>>>
>>> Thanks in advance.
>>>
>>> --
>>> 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/d8b89181-f0d9-4ee8-9f79-dedec63738d2o%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/CAPcTzRYC7UgBAE%3Dm47w74w7kx7JQEtt3ZGZ1naV%2B1tr4jiicYw%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/CAP7OQq11pVJOX6j6fZRHki2YVNiFE8w_yF_BAeFaCGf_mEhZdQ%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/CAPcTzRameZyEwswkSEvgn_txzHYnir-q%2B80SjeKxDSrqmotPVA%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/CA%2Bt%2BYr3m5wAivA4hL3QX%2B9hTWTEB%3Ddiz-%2B8B8NSkQyKSnqQ%3DnA%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/CAPcTzRZbe3pxoGycbce18ykxbs9R18CEn7hybe%3DjxFHgDBYe5g%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/CAPVtpYiTieo-n9F

advice on role management in django

2020-06-12 Thread cosmos multi
I am trying to work with a role system that allows from the user registry, 
select the role to which you want to belong, the problem is that I do not 
get the best way to do it because when I want to do validations it 
generates many errors, investigating a bit I realized that the groups are 
more efficient in this sense or well I think so, if someone could give me 
some advice and a link to an example of how to handle this I would be very 
grateful.

this is my code
class Usuario(AbstractUser):
is_administrador = models.BooleanField(default=False)
is_satelite = models.BooleanField(default=False)
def get_administrador(self):
administrador = None
if hasattr(self, 'administrador'):
administrador = self.administrador
return administrador
def get_satelite(self):
satelite = None
if hasattr(self, 'satelite'):
satelite = self.satelite
return satelite
def __str__(self):
return '%s %s' % (self.first_name, self.last_name)
class Meta:
db_table = 'auth_user'
class Administrador(models.Model):
usuario = models.OneToOneField(Usuario, on_delete=models.CASCADE)
imagen = models.ImageField(null=True, blank=True)
razon_social = models.CharField(max_length=30)
class Satelite(models.Model):
usuario = models.OneToOneField(Usuario, on_delete=models.CASCADE)
imagen = models.ImageField(null=True, blank=True)
nivel_acadademico = models.CharField(max_length=30)
def __str__(self):
return str(self.usuario)
@receiver(post_save, sender=Usuario)
def asignar_rol(sender, instance, **kwargs):
if kwargs.get('created', False):
if instance.is_administrador:
Administrador.objects.get_or_create(usuario=instance)
elif instance.is_satelite:
Satelite.objects.get_or_create(usuario=instance)

-- 
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/14d90002-8cae-4478-a14a-6aed537e9039o%40googlegroups.com.


How to pass the extra argument to an existing formset

2020-06-12 Thread 'MH' via Django users
Hi

I have a formset that is created by an inline formset factory. So, I have 
seen that during the creation I can pass the extra argument in order to 
create more blank forms. Fine :)

But I also have the case where I want to pre-populate a formset based on 
entries in the database. In a way I thought I could just hit the database 
and lookup the number of matching entries like objects = 
Model.objects.filter(id=thatid).values().
And then I could pass the individual entry data to the forms in the 
formset. I have managed to do this for one form in the formset, but I do 
not know how to get django to create a formset with x extra forms in it, 
based on the number of database entries. I guess I could again create one 
formset with an inline formset factory, but is it also possible to use the 
initial formset that I already created in my forms.py and to somehow pass 
the extra argument?

Best regards

-- 
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/a4aa49f0-9d30-4b19-b4cc-e1d715e97674o%40googlegroups.com.


Re: Django, GraphQL and React Native

2020-06-12 Thread ndifreke umoren
@Waled thanks for your response. That's exactly what I did but I keep 
having no data sent back. I tested my API with graphiql and it works 
perfectly but on React Native, I keep getting "Network Error: Network 
failed" error. I'd love all the help I can get solving this problem. Thanks.

On Friday, June 12, 2020 at 12:56:34 AM UTC+1, Walid Kambagha wrote:
>
> You can use Apollo the same way you’d use with React to connect to the API.
>
> On Thu, 11 Jun 2020 at 22:21, ndifreke umoren  > wrote:
>
>> Hello everyone. I am working on a React Native mobile app with a GraphQL 
>> endpoint I built using Python Django. Please I need help connecting the API 
>> with the client. 
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/250b31a2-b276-4d75-a93a-b1e004491e55o%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/0e4decb3-7f78-466f-96ac-8d01f474b3f7o%40googlegroups.com.


Re: I need help on Keycloak with django

2020-06-12 Thread Kasper Laudrup

Hi Raghavendra,

On 12/06/2020 12.00, Raghavendra AK wrote:
I'm training to implement keycloak with django using 
https://github.com/jhuapl-boss/boss-oidc but getting error : *Could not 
import 'path.to.function' for API setting 'LOAD_USER_ROLES'. 
ModuleNotFoundError: No module named 'path'*

*
*


You need to actually modify the settings.py file according to the 
comments in the file. Not just copy it and expect everything to 
magically work however you want it.


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/2a7663e6-10f9-e07b-3cc3-f8052a647ff5%40stacktrace.dk.


Re: Error running Django tutorial

2020-06-12 Thread temitope iyanoye
I’m using Django 3.0 and I have this same issue following the official Django 
tutorial, has anyone been able to fix it? Please I need help, 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1d8325c4-5bdb-47c3-ba69-f6500382983fo%40googlegroups.com.


Re: Contact() got an unexpected keyword argument 'fname'

2020-06-12 Thread José Zuñiga
Try using the call of model Contact like this:

contact = Contact.objects.create(vars...)
in vars use the same inputs.



On Thursday, June 11, 2020 at 1:02:49 PM UTC-4, R D Saini wrote:
>
> [image: Screenshot (39).png]
> please my help me this error solved
>

-- 
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/c7906caa-830b-4f74-a89d-40734b08d8f8o%40googlegroups.com.


Realtime reading data

2020-06-12 Thread Sonia Ayachi
how python / django can read the state of a sensor in real time? I would
like to read the state of my PIR sensor in real time with python . Ajax
does not work . Is there any solution ?

-- 
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/CAMLH%2Bfe%3D69R%3DnVDjnJSRP1N1x_K96j12Afs39TVrrzK1CQGM-w%40mail.gmail.com.


I need help on Keycloak with django

2020-06-12 Thread Raghavendra AK
I'm training to implement keycloak with django using 
https://github.com/jhuapl-boss/boss-oidc but getting error : *Could not 
import 'path.to.function' for API setting 'LOAD_USER_ROLES'. 
ModuleNotFoundError: No module named 'path'*

I really appreciate your help or any sample code

-- 
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/f9548534-afd0-4ff5-9dcf-ab3fc48bc609o%40googlegroups.com.


Re: how to use session ???

2020-06-12 Thread Kasper Laudrup

Hi Meera,

On 12/06/2020 12.55, meera gangani wrote:

I am new in django
How can i use session in this views.py file



Try to explain more in details what you mean by "use session", then 
you'll have a much better chance of getting some 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9f1ab5c0-50be-ccc1-3cb7-37b214604427%40stacktrace.dk.


Re: makemessages - unable to find a locale path

2020-06-12 Thread Aldian Fazrihady
makemessages should still extract texts from code and put it in po files
and store the po files somewhere? Or should it do nothing?

On Fri, Jun 12, 2020 at 4:03 PM Kai Kobschätzki 
wrote:

> No error message anymore :)
> On 6/12/20 11:00 AM, Aldian Fazrihady wrote:
>
> After django "forget" the directory, what do you expect makemessages to do?
>
> On Fri, Jun 12, 2020 at 3:41 PM Kai Kobschätzki <
> kai.kobschaet...@gmail.com> wrote:
>
>> Hi Aldian,
>>
>> thanks for your response!
>>
>> I do not want a new folder. I removed a folder and the localization don't
>> accept it..
>>
>> Greetings
>>
>> bengoshi
>>
>>
>> On 6/12/20 10:26 AM, Aldian Fazrihady wrote:
>>
>> Hi,
>>
>> you need to set LOCALE_PATHS in the settings file point to your new
>> folder.
>> For example,
>>
>> LOCALE_PATHS = [os.path.join(BASE_DIR, 'new_locale')]
>>
>>
>> On Fri, Jun 12, 2020 at 3:08 PM Kai Kobschätzki <
>> kai.kobschaet...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I have some *.po files. But now I am getting the message error „Unable
>>> to find a locale path to store translations for file $directory“.
>>>
>>> All I find with google is that I have to create a subdirectory locale in
>>> the $directory. But I removed the $directory, so I can't or I do not
>>> want to recreate the origina directory...
>>>
>>> Do anyone know how I can say django to „forget“ the directory?
>>>
>>> Thanks!
>>>
>>> bengoshi
>>>
>>>
>>> --
>>> 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/7a30a9cd-4538-3295-5dc5-6a0b1cee42ed%40gmail.com
>>> .
>>>
>>
>>
>> --
>> Regards,
>>
>> Aldian Fazrihady
>> http://aldianfazrihady.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/CAN7EoAZ3MWwkQ32DnKrwqxt1MEmRjmzTRCPQZWY_7AP1GYimOA%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/37f6740f-b9df-f3a0-32ae-474c26202cd0%40gmail.com
>> 
>> .
>>
>
>
> --
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.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/CAN7EoAarEu9Nu_Hp5LRLF7mRGMWpUe-9YK7%3DHgwsQmJraiPKgw%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/128ada02-6253-9354-22cb-6dd92c5153a7%40gmail.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.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/CAN7EoAbz9y%2B6%3DLWF89BTni%2By_M_HtxSNeH1wfCvy9VT9WeRf9w%40mail.gmail.com.


Re: How to add a button to Django Admin user menu (the one with logout, change password, ...) ? [SOLVED]

2020-06-12 Thread Olivier
It seems django-admin-tools is doing what I was after, and more.

If a django-admin-tools-enabled admin site could peacefully co-exists with 
classical admin site, then it would be perfect.

Le vendredi 12 juin 2020 10:31:43 UTC+2, Olivier a écrit :
>
> Hello,
>
> When logged into Django Admin, I can see a header on view top with:
> - "Django Administration" on the left
> - 4  items on the right
> + "welcome Foo"
> + "View site" link
> + "Change password"
> + "Logout"
>
> I want to a add a styled "Deploy" button, anywhere inside this header, so 
> that, after editing data, logged Admin user, can trigger a custom action.
>
> How can I implement this ?
>
> Best regards
>

-- 
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/129f8853-480f-4040-ac7c-a0f862c4a2e2o%40googlegroups.com.


Re: makemessages - unable to find a locale path

2020-06-12 Thread Kai Kobschätzki
No error message anymore :)

On 6/12/20 11:00 AM, Aldian Fazrihady wrote:
> After django "forget" the directory, what do you expect makemessages
> to do?
>
> On Fri, Jun 12, 2020 at 3:41 PM Kai Kobschätzki
> mailto:kai.kobschaet...@gmail.com>> wrote:
>
> Hi Aldian,
>
> thanks for your response!
>
> I do not want a new folder. I removed a folder and the
> localization don't accept it..
>
> Greetings
>
> bengoshi
>
>
> On 6/12/20 10:26 AM, Aldian Fazrihady wrote:
>> Hi,
>>
>> you need to set LOCALE_PATHS in the settings file point to your
>> new folder.
>> For example,
>> LOCALE_PATHS = [os.path.join(BASE_DIR, 'new_locale')]
>>
>> On Fri, Jun 12, 2020 at 3:08 PM Kai Kobschätzki
>> mailto:kai.kobschaet...@gmail.com>>
>> wrote:
>>
>> Hi all,
>>
>> I have some *.po files. But now I am getting the message
>> error „Unable
>> to find a locale path to store translations for file $directory“.
>>
>> All I find with google is that I have to create a
>> subdirectory locale in
>> the $directory. But I removed the $directory, so I can't or I
>> do not
>> want to recreate the origina directory...
>>
>> Do anyone know how I can say django to „forget“ the directory?
>>
>> Thanks!
>>
>> bengoshi
>>
>>
>> -- 
>> 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/7a30a9cd-4538-3295-5dc5-6a0b1cee42ed%40gmail.com.
>>
>>
>>
>> -- 
>> Regards,
>>
>> Aldian Fazrihady
>> http://aldianfazrihady.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/CAN7EoAZ3MWwkQ32DnKrwqxt1MEmRjmzTRCPQZWY_7AP1GYimOA%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/37f6740f-b9df-f3a0-32ae-474c26202cd0%40gmail.com
> 
> .
>
>
>
> -- 
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.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/CAN7EoAarEu9Nu_Hp5LRLF7mRGMWpUe-9YK7%3DHgwsQmJraiPKgw%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/128ada02-6253-9354-22cb-6dd92c5153a7%40gmail.com.


Re: makemessages - unable to find a locale path

2020-06-12 Thread Aldian Fazrihady
After django "forget" the directory, what do you expect makemessages to do?

On Fri, Jun 12, 2020 at 3:41 PM Kai Kobschätzki 
wrote:

> Hi Aldian,
>
> thanks for your response!
>
> I do not want a new folder. I removed a folder and the localization don't
> accept it..
>
> Greetings
>
> bengoshi
>
>
> On 6/12/20 10:26 AM, Aldian Fazrihady wrote:
>
> Hi,
>
> you need to set LOCALE_PATHS in the settings file point to your new folder.
> For example,
>
> LOCALE_PATHS = [os.path.join(BASE_DIR, 'new_locale')]
>
>
> On Fri, Jun 12, 2020 at 3:08 PM Kai Kobschätzki <
> kai.kobschaet...@gmail.com> wrote:
>
>> Hi all,
>>
>> I have some *.po files. But now I am getting the message error „Unable
>> to find a locale path to store translations for file $directory“.
>>
>> All I find with google is that I have to create a subdirectory locale in
>> the $directory. But I removed the $directory, so I can't or I do not
>> want to recreate the origina directory...
>>
>> Do anyone know how I can say django to „forget“ the directory?
>>
>> Thanks!
>>
>> bengoshi
>>
>>
>> --
>> 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/7a30a9cd-4538-3295-5dc5-6a0b1cee42ed%40gmail.com
>> .
>>
>
>
> --
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.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/CAN7EoAZ3MWwkQ32DnKrwqxt1MEmRjmzTRCPQZWY_7AP1GYimOA%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/37f6740f-b9df-f3a0-32ae-474c26202cd0%40gmail.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.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/CAN7EoAarEu9Nu_Hp5LRLF7mRGMWpUe-9YK7%3DHgwsQmJraiPKgw%40mail.gmail.com.


Re: Contact() got an unexpected keyword argument 'fname'

2020-06-12 Thread Kasper Laudrup

Hi RD.

I can't remember all the scoping rules of Python, but you most likely 
try construct an instance of Contact from your views, not your model 
(ie. the same class where your call is failing).


Consider renaming your Contact view class to ContactView or change your 
import from model and use the fully qualified name, ie. models.Contact.


Hopefully that should solve it, and would IMO improve readability a bit 
anyway.


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/06d0a625-719b-d9e7-9017-ebc7cf739538%40stacktrace.dk.


Re: makemessages - unable to find a locale path

2020-06-12 Thread Kai Kobschätzki
Hi Aldian,

thanks for your response!

I do not want a new folder. I removed a folder and the localization
don't accept it..

Greetings

bengoshi


On 6/12/20 10:26 AM, Aldian Fazrihady wrote:
> Hi,
>
> you need to set LOCALE_PATHS in the settings file point to your new
> folder.
> For example,
> LOCALE_PATHS = [os.path.join(BASE_DIR, 'new_locale')]
>
> On Fri, Jun 12, 2020 at 3:08 PM Kai Kobschätzki
> mailto:kai.kobschaet...@gmail.com>> wrote:
>
> Hi all,
>
> I have some *.po files. But now I am getting the message error „Unable
> to find a locale path to store translations for file $directory“.
>
> All I find with google is that I have to create a subdirectory
> locale in
> the $directory. But I removed the $directory, so I can't or I do not
> want to recreate the origina directory...
>
> Do anyone know how I can say django to „forget“ the directory?
>
> Thanks!
>
> bengoshi
>
>
> -- 
> 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/7a30a9cd-4538-3295-5dc5-6a0b1cee42ed%40gmail.com.
>
>
>
> -- 
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.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/CAN7EoAZ3MWwkQ32DnKrwqxt1MEmRjmzTRCPQZWY_7AP1GYimOA%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/37f6740f-b9df-f3a0-32ae-474c26202cd0%40gmail.com.


How to add a button to Django Admin user menu (the one with logout, change password, ...) ?

2020-06-12 Thread Olivier
Hello,

When logged into Django Admin, I can see a header on view top with:
- "Django Administration" on the left
- 4  items on the right
+ "welcome Foo"
+ "View site" link
+ "Change password"
+ "Logout"

I want to a add a styled "Deploy" button, anywhere inside this header, so 
that, after editing data, logged Admin user, can trigger a custom action.

How can I implement this ?

Best regards

-- 
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/4a07b20c-14fb-42a7-8e8f-20c84cc36c3eo%40googlegroups.com.


Re: makemessages - unable to find a locale path

2020-06-12 Thread Aldian Fazrihady
Hi,

you need to set LOCALE_PATHS in the settings file point to your new folder.
For example,

LOCALE_PATHS = [os.path.join(BASE_DIR, 'new_locale')]


On Fri, Jun 12, 2020 at 3:08 PM Kai Kobschätzki 
wrote:

> Hi all,
>
> I have some *.po files. But now I am getting the message error „Unable
> to find a locale path to store translations for file $directory“.
>
> All I find with google is that I have to create a subdirectory locale in
> the $directory. But I removed the $directory, so I can't or I do not
> want to recreate the origina directory...
>
> Do anyone know how I can say django to „forget“ the directory?
>
> Thanks!
>
> bengoshi
>
>
> --
> 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/7a30a9cd-4538-3295-5dc5-6a0b1cee42ed%40gmail.com
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.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/CAN7EoAZ3MWwkQ32DnKrwqxt1MEmRjmzTRCPQZWY_7AP1GYimOA%40mail.gmail.com.


makemessages - unable to find a locale path

2020-06-12 Thread Kai Kobschätzki
Hi all,

I have some *.po files. But now I am getting the message error „Unable
to find a locale path to store translations for file $directory“.

All I find with google is that I have to create a subdirectory locale in
the $directory. But I removed the $directory, so I can't or I do not
want to recreate the origina directory...

Do anyone know how I can say django to „forget“ the directory?

Thanks!

bengoshi


-- 
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/7a30a9cd-4538-3295-5dc5-6a0b1cee42ed%40gmail.com.