Re: 'WSGIRequest' object has no attribute '

2019-05-21 Thread sagar ninave
when i am opening admin panel then it is getting error

On Wed, May 22, 2019 at 11:19 AM Abu Yusuf 
wrote:

> I did run your project and it's working fine.
>
> On Wed, May 22, 2019 at 11:43 AM sagar ninave 
> wrote:
>
>> no i am getting this error again
>>
>>
>> On Wed, May 22, 2019 at 10:25 AM Abu Yusuf 
>> wrote:
>>
>>>
>>> Comment out the
>>>
>>> #'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
>>>
>>> in your settings.py file in Middleware or remove. Then run again. It
>>> will work.
>>>
>>> On Wed, May 22, 2019 at 10:36 AM Abu Yusuf 
>>> wrote:
>>>
 This issue has been resolved yet?

 On Tue, May 21, 2019 at 4:55 PM sagar ninave 
 wrote:

> my manage.py is in project folder you can check attachment
>
> On Mon, May 20, 2019 at 5:42 PM Abu Yusuf 
> wrote:
>
>> Where is your manage.py file?
>>
>> On Mon, May 20, 2019 at 11:57 AM sagar ninave 
>> wrote:
>>
>>>  AttributeError at /admin/  'WSGIRequest' object has no attribute
>>> 'user'  Request Method: GET Request URL:
>>> http://127.0.0.1:8000/admin/ Django Version: 2.2 Exception
>>> Type: AttributeError Exception Value:   'WSGIRequest' object 
>>> has no
>>> attribute '
>>>
>>>
>>>
>>>
>>> i am getting this error please help me
>>> i have attached zipfile of my project
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/eee17c55-c0ec-408d-bd54-10539e93cb9b%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACNsr28zF%2BgtfQ3_-07qjVPoCz6Hy03Bq0zAaazj3d86zknJJA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> 
> sagar ninave
> about.me/sagarninave
> 
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA6pdZ_WeaebY%3DHUAPN8ee4h7nrJSZx%3DsEM0h6ZjZ3tE76gXyA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CACNsr28P1XBUGypOiBoQiV5RZ0ax1%3DF%2BTowA5eK6UPEJhq7yaw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>> 

Re: Need help for Cascading Drop Down for Continent, Country in Admin GUI - Not Getting correct Answer from Many Days

2019-05-21 Thread Balaji Shetty
Hi

I have registered model in admin.py
Added Continent  ( Cont1, Cont2, Cont3 )

Added Country under Continent

Cont1 - Count11
Cont1- Count12

Cont2 - Count21
Cont2-Count22

Con3-Count31
Con3-Count31

When I add Location

When i select Cont1, I should get only Count11 , Count12

When i select Cont2, I should get only Count21 , Count22

When i select Cont3, I should get only Count31 , Count32

But I get all Countries under all Continent. Cascading dependency are not
shown

I tried different option but lot of issues are there .



Example



On Wed, May 22, 2019 at 10:56 AM Nitin Kumar 
wrote:

> Everything seems alright. It seems you haven't created any continents yet.
> The table is empty.
>
> On Wed, 22 May, 2019, 10:52 AM Balaji Shetty  wrote:
>
>> Hi
>>
>> I am learning Django from last months and want to implement Cascading
>> Drop Down for Continent and  Country  in Admin GUI.
>>
>> I dropped same query two times but i could not get exact correct solution.
>>
>> I tried lot of option like
>> django-smart-select and many more..
>>
>> But i could not get updates in drop down.
>>
>>  Can Any Django Expert solve this issue? Your help would be highly
>> appreciated.
>>
>> This is sample Model for  demonstration of the schema
>> models.py
>> --
>>
>>
>> class Continent(models.Model):
>> name = models.CharField(max_length=255)
>>
>> def __str__(self):
>> return self.name
>>
>>
>> class Country(models.Model):
>> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
>> name = models.CharField(max_length=255)
>>
>> def __str__(self):
>> return self.name
>>
>> class Location(models.Model):
>> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
>> country = models.ForeignKey(Country,on_delete=models.CASCADE)
>> city = models.CharField(max_length=50)
>> street = models.CharField(max_length=100)
>>
>> def __str__(self):
>> return self.city
>>
>>
>>
>>
>> --
>>
>>
>> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
>> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
>> *Official: bsshe...@sggs.ac.in  *
>> *  Mobile: +91-9270696267*
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAECSbOtoje0sdMsoeQvCO-mq-h-AQVOKtnYA3wFnLAE-tPhXGg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKzNicGqspLgrFnYf%3D%2B22s8SJUc2uVTt5223UJ7Ba1d6ZbtqbA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 


*Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
*SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
*Official: bsshe...@sggs.ac.in  *
*  Mobile: +91-9270696267*

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECSbOsdkJZ%3DPT7vxyt1K5c2%3D-%2B9_squ5SES0zK_vD5Dyo97Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'WSGIRequest' object has no attribute '

2019-05-21 Thread Abu Yusuf
I did run your project and it's working fine.

On Wed, May 22, 2019 at 11:43 AM sagar ninave  wrote:

> no i am getting this error again
>
>
> On Wed, May 22, 2019 at 10:25 AM Abu Yusuf 
> wrote:
>
>>
>> Comment out the
>>
>> #'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
>>
>> in your settings.py file in Middleware or remove. Then run again. It will
>> work.
>>
>> On Wed, May 22, 2019 at 10:36 AM Abu Yusuf 
>> wrote:
>>
>>> This issue has been resolved yet?
>>>
>>> On Tue, May 21, 2019 at 4:55 PM sagar ninave 
>>> wrote:
>>>
 my manage.py is in project folder you can check attachment

 On Mon, May 20, 2019 at 5:42 PM Abu Yusuf 
 wrote:

> Where is your manage.py file?
>
> On Mon, May 20, 2019 at 11:57 AM sagar ninave 
> wrote:
>
>>  AttributeError at /admin/  'WSGIRequest' object has no attribute
>> 'user'  Request Method: GET Request URL:
>> http://127.0.0.1:8000/admin/ Django Version: 2.2 Exception Type:
>> AttributeError Exception Value:   'WSGIRequest' object has no
>> attribute '
>>
>>
>>
>>
>> i am getting this error please help me
>> i have attached zipfile of my project
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/eee17c55-c0ec-408d-bd54-10539e93cb9b%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACNsr28zF%2BgtfQ3_-07qjVPoCz6Hy03Bq0zAaazj3d86zknJJA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


 --

 
 sagar ninave
 about.me/sagarninave
 

 --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAA6pdZ_WeaebY%3DHUAPN8ee4h7nrJSZx%3DsEM0h6ZjZ3tE76gXyA%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACNsr28P1XBUGypOiBoQiV5RZ0ax1%3DF%2BTowA5eK6UPEJhq7yaw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> 
> sagar ninave
> about.me/sagarninave
> 
>
> --
> You 

Re: 'WSGIRequest' object has no attribute '

2019-05-21 Thread sagar ninave
no i am getting this error again


On Wed, May 22, 2019 at 10:25 AM Abu Yusuf 
wrote:

>
> Comment out the
>
> #'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
>
> in your settings.py file in Middleware or remove. Then run again. It will
> work.
>
> On Wed, May 22, 2019 at 10:36 AM Abu Yusuf 
> wrote:
>
>> This issue has been resolved yet?
>>
>> On Tue, May 21, 2019 at 4:55 PM sagar ninave 
>> wrote:
>>
>>> my manage.py is in project folder you can check attachment
>>>
>>> On Mon, May 20, 2019 at 5:42 PM Abu Yusuf 
>>> wrote:
>>>
 Where is your manage.py file?

 On Mon, May 20, 2019 at 11:57 AM sagar ninave 
 wrote:

>  AttributeError at /admin/  'WSGIRequest' object has no attribute
> 'user'  Request Method: GET Request URL:
> http://127.0.0.1:8000/admin/ Django Version: 2.2 Exception Type:
> AttributeError Exception Value:   'WSGIRequest' object has no
> attribute '
>
>
>
>
> i am getting this error please help me
> i have attached zipfile of my project
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eee17c55-c0ec-408d-bd54-10539e93cb9b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CACNsr28zF%2BgtfQ3_-07qjVPoCz6Hy03Bq0zAaazj3d86zknJJA%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> --
>>>
>>> 
>>> sagar ninave
>>> about.me/sagarninave
>>> 
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAA6pdZ_WeaebY%3DHUAPN8ee4h7nrJSZx%3DsEM0h6ZjZ3tE76gXyA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACNsr28P1XBUGypOiBoQiV5RZ0ax1%3DF%2BTowA5eK6UPEJhq7yaw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

sagar ninave
about.me/sagarninave


-- 
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 post to 

Re: Need help for Cascading Drop Down for Continent, Country in Admin GUI - Not Getting correct Answer from Many Days

2019-05-21 Thread Nitin Kumar
Everything seems alright. It seems you haven't created any continents yet.
The table is empty.

On Wed, 22 May, 2019, 10:52 AM Balaji Shetty  Hi
>
> I am learning Django from last months and want to implement Cascading Drop
> Down for Continent and  Country  in Admin GUI.
>
> I dropped same query two times but i could not get exact correct solution.
>
> I tried lot of option like
> django-smart-select and many more..
>
> But i could not get updates in drop down.
>
>  Can Any Django Expert solve this issue? Your help would be highly
> appreciated.
>
> This is sample Model for  demonstration of the schema
> models.py
> --
>
>
> class Continent(models.Model):
> name = models.CharField(max_length=255)
>
> def __str__(self):
> return self.name
>
>
> class Country(models.Model):
> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
> name = models.CharField(max_length=255)
>
> def __str__(self):
> return self.name
>
> class Location(models.Model):
> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
> country = models.ForeignKey(Country,on_delete=models.CASCADE)
> city = models.CharField(max_length=50)
> street = models.CharField(max_length=100)
>
> def __str__(self):
> return self.city
>
>
>
>
> --
>
>
> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
> *Official: bsshe...@sggs.ac.in  *
> *  Mobile: +91-9270696267*
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAECSbOtoje0sdMsoeQvCO-mq-h-AQVOKtnYA3wFnLAE-tPhXGg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKzNicGqspLgrFnYf%3D%2B22s8SJUc2uVTt5223UJ7Ba1d6ZbtqbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Need help for Cascading Drop Down for Continent, Country in Admin GUI - Not Getting correct Answer from Many Days

2019-05-21 Thread Balaji Shetty
Hi

I am learning Django from last months and want to implement Cascading Drop
Down for Continent and  Country  in Admin GUI.

I dropped same query two times but i could not get exact correct solution.

I tried lot of option like
django-smart-select and many more..

But i could not get updates in drop down.

 Can Any Django Expert solve this issue? Your help would be highly
appreciated.

This is sample Model for  demonstration of the schema
models.py
--


class Continent(models.Model):
name = models.CharField(max_length=255)

def __str__(self):
return self.name


class Country(models.Model):
continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
name = models.CharField(max_length=255)

def __str__(self):
return self.name

class Location(models.Model):
continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
country = models.ForeignKey(Country,on_delete=models.CASCADE)
city = models.CharField(max_length=50)
street = models.CharField(max_length=100)

def __str__(self):
return self.city




-- 


*Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
*SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
*Official: bsshe...@sggs.ac.in  *
*  Mobile: +91-9270696267*

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECSbOtoje0sdMsoeQvCO-mq-h-AQVOKtnYA3wFnLAE-tPhXGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'WSGIRequest' object has no attribute '

2019-05-21 Thread Abu Yusuf
Comment out the

#'django.contrib.auth.middleware.SessionAuthenticationMiddleware',

in your settings.py file in Middleware or remove. Then run again. It will
work.

On Wed, May 22, 2019 at 10:36 AM Abu Yusuf 
wrote:

> This issue has been resolved yet?
>
> On Tue, May 21, 2019 at 4:55 PM sagar ninave 
> wrote:
>
>> my manage.py is in project folder you can check attachment
>>
>> On Mon, May 20, 2019 at 5:42 PM Abu Yusuf 
>> wrote:
>>
>>> Where is your manage.py file?
>>>
>>> On Mon, May 20, 2019 at 11:57 AM sagar ninave 
>>> wrote:
>>>
  AttributeError at /admin/  'WSGIRequest' object has no attribute
 'user'  Request Method: GET Request URL:
 http://127.0.0.1:8000/admin/ Django Version: 2.2 Exception Type:
 AttributeError Exception Value:   'WSGIRequest' object has no
 attribute '




 i am getting this error please help me
 i have attached zipfile of my project

 --
 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 post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/eee17c55-c0ec-408d-bd54-10539e93cb9b%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CACNsr28zF%2BgtfQ3_-07qjVPoCz6Hy03Bq0zAaazj3d86zknJJA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>>
>> 
>> sagar ninave
>> about.me/sagarninave
>> 
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAA6pdZ_WeaebY%3DHUAPN8ee4h7nrJSZx%3DsEM0h6ZjZ3tE76gXyA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACNsr28P1XBUGypOiBoQiV5RZ0ax1%3DF%2BTowA5eK6UPEJhq7yaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'WSGIRequest' object has no attribute '

2019-05-21 Thread Abu Yusuf
This issue has been resolved yet?

On Tue, May 21, 2019 at 4:55 PM sagar ninave  wrote:

> my manage.py is in project folder you can check attachment
>
> On Mon, May 20, 2019 at 5:42 PM Abu Yusuf 
> wrote:
>
>> Where is your manage.py file?
>>
>> On Mon, May 20, 2019 at 11:57 AM sagar ninave 
>> wrote:
>>
>>>  AttributeError at /admin/  'WSGIRequest' object has no attribute
>>> 'user'  Request Method: GET Request URL:
>>> http://127.0.0.1:8000/admin/ Django Version: 2.2 Exception Type:
>>> AttributeError Exception Value:   'WSGIRequest' object has no
>>> attribute '
>>>
>>>
>>>
>>>
>>> i am getting this error please help me
>>> i have attached zipfile of my project
>>>
>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/eee17c55-c0ec-408d-bd54-10539e93cb9b%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACNsr28zF%2BgtfQ3_-07qjVPoCz6Hy03Bq0zAaazj3d86zknJJA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> 
> sagar ninave
> about.me/sagarninave
> 
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA6pdZ_WeaebY%3DHUAPN8ee4h7nrJSZx%3DsEM0h6ZjZ3tE76gXyA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACNsr2_a21QJHmewksCGDNSzhW5k3pO_4aBZ3HQvtae6Q_6GoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is it possible to value based on another aggregation?

2019-05-21 Thread Jim Illback
Sorry this is late.

I’d use the annotate to get the Max of one FK. Then, do a query on the other FK 
table with inverted order_by and use the [0] notation to just retrieve the 
latest row. It is 2 queries, but FK processes are indexed and should be fast.

Hope this helps.

Jim Illback

On Apr 23, 2019, at 7:47 PM, Kenny Loveall 
mailto:ke...@kennyloveall.com>> wrote:

Right, so that works for getting the most recently updated at time (I can just 
do 
`.values('foreign_key_id').annotate(most_recently_updated_at=Max('created_at')`).
 But how can I get the user that created that record? Max('user_id') gives me 
just the highest ID.



On Tue, Apr 23, 2019 at 2:13 PM Matthew Pava 
mailto:matthew.p...@iss.com>> wrote:
Use annotate.
https://docs.djangoproject.com/en/2.2/topics/db/aggregation/#generating-aggregates-for-each-item-in-a-queryset




From: django-users@googlegroups.com 
[mailto:django-users@googlegroups.com] On 
Behalf Of Kenny Loveall
Sent: Tuesday, April 23, 2019 12:58 PM
To: django-users@googlegroups.com
Subject: Is it possible to value based on another aggregation?

Hi everyone,

I'm trying to figure out if it's possible to get a value for one field based on 
the aggregation of another? Specifically, I've got a model with a created_at 
timestamp, a foreign key, and a created_by user foreign key. I want to group 
the objects based on the foreign key and get the time and user of the most 
recently created object.

I know how to do this with a subquery and how to get the most recently created 
timestamp for each group of objects without a subquery, but I'm not sure how to 
get the user without using a subquery. Is this possible?

Thanks,
Kenny
--
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 post to this group, send email to 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGABHYC3S-9o_ay1%2BPiANm6vv5py7tFBKyuUCzT1%2Bz49Z%2BpAnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f1b62c769d1248a283e4bae3c904a5db%40iss2.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGABHYArEeQLg%3DQoKOG5bnm76gbbPB6ASVsf%3DhBWR%2BsfXzgk%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/14B298C7-4E64-43E0-A10D-490DFA51014E%40hotmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Projects to work on

2019-05-21 Thread DEEPAK RAGHAV
The chat project link is not working.
It is showing error 404.

On Wed, May 22, 2019 at 3:21 AM wanbao jin  wrote:

> Hi, Ahmed, Could you share with me about it in more detail?
>
> On Monday, May 6, 2019 at 2:45:18 AM UTC+8, Ahmed Ishtiaque wrote:
>>
>> I also have a small chat project that you could possibly take a look at!
>> It's called chatter and it's on PyPI: www.pypi.org/django-chatter
>>
>> It definitely needs a lot of tuning up to get to a properly usable state.
>>
>> Best,
>> Ahmed
>>
>> On Sun, May 5, 2019, 1:33 PM Jamiu Olashile Salimon 
>> wrote:
>>
>>> Hello guys,
>>>
>>> I've been learning Django for about 6 months now. So far, it's been
>>> great. Currently, I've been looking for a project to work on and its been
>>> difficult for me to decide. One that will challenge me to know more about
>>> Django.
>>>
>>> I will much appreciate any project suggestions.
>>>
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/be3a7115-02ed-4134-950a-c9c9fdb7212a%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8a3c8674-9253-41d8-bd30-552796b271de%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACzRgKi0z7LYa%3DmA8fU%3D6U3M-siR0ayO7SoeR-3bWqubVa%2BZBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Occasional CSRF cookie not set django 1.11 -> 2.1

2019-05-21 Thread Aldian Fazrihady
The form page itself can expire if you let it readily opened in a browser
tab for hours. If I did that and I didn't reload my form before using it,
I will get a CSRF error.

There several ideas to fix it.  The point is to have CSRF cookie to always
fresh,  and your form will use that cookie instead of CSRF in hidden form
field.

Regards,

Aldian Fazrihady
https://www.aldianfazrihady.com/en-us/

On Wed, 22 May 2019, 04:52 Yusuf Musleh,  wrote:

> Hello,
>
> We recently migrated from django 1.11.5 to 2.1.4. We performed all the
> necessary changes needed for the migration and the application to work,
> things went smoothly except for some CSRF validation issues. After the
> migration on our production server we noticed an increase in the number of
> 403 errors mainly the `CSRF cookie not set.` error. We added more logging
> and investigated to see if they were legitimate errors, some are, however
> we discovered that most aren’t. They were normal users making normal
> requests on our website. We get around 30 of these failed requests that
> should not have failed a day, it happens randomly across random devices,
> browsers and urls, and has been quite difficult to reproduce.
>
> We Copy/Pasted the source code of `middleware.csrf` and added it to our
> code base as a custom middleware to add more logging and get a better
> traceback in sentry when the error occurs:
>
> - For some reason the token is not set. `csrf_token =
> request.META.get('CSRF_COOKIE’)` returns `None`
>
> - We know that if a user got the error, if they simply refresh the page
> things would work perfectly fine, this means that setting the token works,
> but sometimes it does not
>
> - We know that it is not a problem with our frontend since we also got
> this error in the django admin including non-login requests
>
> We also tried clearing all the expired sessions, and set
> `CSRF_USE_SESSIONS = True`, however nothing changed.
>
> Also something that might be related, after the migration to 2.1 we
> started noticing users getting logged out more frequently, with no errors
> at all, although we set the session to expire in 30 days. We’ve had users
> complain about occasionally being logged out multiple times in day, again
> on random devices and browsers.
>
> Our project is deployed on AWS Elasticbeanstalk running Apache with RDS
> PostgreSQL 9.6 and CloudFlare DNS/CDN/Cacheing setup.
>
> We’d appreciate any help or pointers regarding this issue or anywhere we
> can look at that could be helpful.
>
> Thanks,
>
> Yusuf
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/06231250-3688-4323-8b79-7ebf2b66b449%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAYFthBbOTQA3qTiBp77gTxP0zFvAkchuv_S61PeX246CA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unwelcome error!

2019-05-21 Thread Adam Parsons
You need to read the error message, it says there is no such table. This 
refers to a missing table in the database. Given it is referring to 
django_session, you have not run migrations yet. 

If you follow the Django project's official tutorial, it will walk you 
through that process in step 2

https://docs.djangoproject.com/en/2.2/intro/tutorial01/

On Tuesday, 21 May 2019 06:22:08 UTC+8, Stephen Owen wrote:
>
> Hi, all,
> I am creating a blog in Django, following lectures on You Tube.  
> Everything was working fine and then an error occurred that I could 
> fathom.  So I have now just started a new project.  One accessing 
> localhost, I got the expected page but when I tried localhost I got this 
> (attached.)
> Any diea what is happening?  The first project was fine up until I 
> probably coded something in teh wrong place.
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/23a86b27-2083-49a0-8235-dbf7852d43c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Forbidden (CSRF token missing or incorrect)

2019-05-21 Thread Abdul Qoyyuum
Hi Django Devs,

Got a problem that I don't understand what's going on or why its gone 
missing.

Logs says:
csrf.py:process_view#184: Forbidden (CSRF token missing or incorrect.)


The necessary code is in there:

$("document").ready(function () {

//
//Setup X-CSRFToken header for
//XHR requests.
//
$.ajaxSetup({
beforeSend: function (xhr, settings) {
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we 
want?
if (cookie.substring(0, name.length + 1) == (name + 
'=')) {
cookieValue = decodeURIComponent(cookie.
substring(name.length + 1));
break;
}
}
}
return cookieValue;
}

if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings
.url))) {
// Only send the token to relative URLs i.e. locally.
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
}
}
});



However, on the Network DevTools, it shows that the CSRFToken is null

Host: django.project.localhost
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 
Firefox/66.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: https://xxx.xxx.xxx.xxx/someURL
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-CSRFToken: null
X-Requested-With: XMLHttpRequest
Content-Length: 347
Connection: keep-alive
Cookie: cookiesession1=05D05AA6TMRNUKHVEOY2WSF7DYB0F3; 
csrftoken=CY9TvQT97LpOZDhF6xZldBrAX4Igyt; 
sessionid=1e4c34b81175fb33465c0197e4ec3a

So as we can see the csrftoken is there, but not able to get it and store 
in X-CSRFToken, even though the code hasn't changed, now its not working.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/06c22757-9814-4d02-b340-3e7e4373c420%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Occasional CSRF cookie not set django 1.11 -> 2.1

2019-05-21 Thread Yusuf Musleh
Hello,

We recently migrated from django 1.11.5 to 2.1.4. We performed all the 
necessary changes needed for the migration and the application to work, 
things went smoothly except for some CSRF validation issues. After the 
migration on our production server we noticed an increase in the number of 
403 errors mainly the `CSRF cookie not set.` error. We added more logging 
and investigated to see if they were legitimate errors, some are, however 
we discovered that most aren’t. They were normal users making normal 
requests on our website. We get around 30 of these failed requests that 
should not have failed a day, it happens randomly across random devices, 
browsers and urls, and has been quite difficult to reproduce.

We Copy/Pasted the source code of `middleware.csrf` and added it to our 
code base as a custom middleware to add more logging and get a better 
traceback in sentry when the error occurs:

- For some reason the token is not set. `csrf_token = 
request.META.get('CSRF_COOKIE’)` returns `None`

- We know that if a user got the error, if they simply refresh the page 
things would work perfectly fine, this means that setting the token works, 
but sometimes it does not

- We know that it is not a problem with our frontend since we also got this 
error in the django admin including non-login requests

We also tried clearing all the expired sessions, and set `CSRF_USE_SESSIONS 
= True`, however nothing changed.

Also something that might be related, after the migration to 2.1 we started 
noticing users getting logged out more frequently, with no errors at all, 
although we set the session to expire in 30 days. We’ve had users complain 
about occasionally being logged out multiple times in day, again on random 
devices and browsers.

Our project is deployed on AWS Elasticbeanstalk running Apache with RDS 
PostgreSQL 9.6 and CloudFlare DNS/CDN/Cacheing setup.

We’d appreciate any help or pointers regarding this issue or anywhere we 
can look at that could be helpful.

Thanks,

Yusuf

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/06231250-3688-4323-8b79-7ebf2b66b449%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Projects to work on

2019-05-21 Thread wanbao jin
Hi, Ahmed, Could you share with me about it in more detail?

On Monday, May 6, 2019 at 2:45:18 AM UTC+8, Ahmed Ishtiaque wrote:
>
> I also have a small chat project that you could possibly take a look at! 
> It's called chatter and it's on PyPI: www.pypi.org/django-chatter 
>
> It definitely needs a lot of tuning up to get to a properly usable state.
>
> Best,
> Ahmed
>
> On Sun, May 5, 2019, 1:33 PM Jamiu Olashile Salimon  > wrote:
>
>> Hello guys,
>>
>> I've been learning Django for about 6 months now. So far, it's been 
>> great. Currently, I've been looking for a project to work on and its been 
>> difficult for me to decide. One that will challenge me to know more about 
>> Django.
>>
>> I will much appreciate any project suggestions.
>>
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/be3a7115-02ed-4134-950a-c9c9fdb7212a%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8a3c8674-9253-41d8-bd30-552796b271de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migrations File too Large preventing Migrate

2019-05-21 Thread Peter Mudoko
On Mon, 20 May 2019, 05:11 Yoo,  wrote:

> In Django 2.2, I run makemigrations then migrate. I wait approx. 5-7
> minutes and then I get "Fatal Python error: Cannot recover from stack
> overflow." "Current thread 0x0002094 (most recent call first):" yada yada
> "File "manage.py", line 17 in main "File manage.py line 21 in "
>
>
> End. I check the migrations file and the file is 4000 lines of code large.
> What do I do in this case? Should I make my own migration files, and if so,
> how?
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2f2f6361-6061-48bd-8b7f-f5297a25f8b8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABfSCxcfAmFJ6QuZYbRVes7m%2BduOT99rjR905JG9RwUivUFhJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migrations File too Large preventing Migrate

2019-05-21 Thread Yoo
https://stackoverflow.com/q/56213264/10973829
Originally, I posted this in StackOverflow. Not getting any responses. I looked 
over all my migration files, and it seems like they get continuously larger.
There are more “Test” tables than what you see in the migration files; what 
I’ve done was split the models.py files into multiple “apps” inside a model 
directory.
I’m using Django-Tagulous, and I’ve made 3 custom Tagulous tables. Some of the 
99 x3 tables are connected to 1 and up to 3 tag fields. The each 99 are 
different in attribution, but on average they have 8 fields. I first migrated 
99 tables. The next 99 would not migrate. 

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f69324c-d5db-4430-95a6-71742cb817b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: No puedo generar qr en django

2019-05-21 Thread Mario R. Osorio
Osman,

Un codigo QR no es otra cosa que una forma compacta de representar 
informacion. Sin embargo, existen varios tipos de codigos QR.

Lo primero que tienes que hacer es seleccionar que es lo que vas a 
representar con el codigo; podria ser simplemente el identificador unico 
del empleado o, dependiendo de tus posibilidades y/o necesidades, un enlace 
que incluya ese identificador unico, y que permita a quien lo lea a ir a la 
pagina contentiva del perfil del empleado. No hay una bala de plata: tu 
escoges tu solucion.

Respecto a cual estandard QR utilizar: debes revisar la bibliografa, porque 
algunos QR son muy limitados, mientras que otros son muy complicados, lo 
que los hace mas dificil de leer.

Revisa estos enlaces:

https://es.wikipedia.org/wiki/C%C3%B3digo_QR

https://www.unitag.io/es/qrcode/what-is-a-qrcode

https://pypi.org/project/qrcode/

https://medium.com/@ngengesenior/qr-codes-generation-with-python-377735be6c5f



On Monday, May 20, 2019 at 6:22:08 PM UTC-4, osman alexander samayoa 
ramirez wrote:
>
> muy buenas quisiera que alquien me pudiera ayudar para poder generar qr a 
> mis empleado y que sea unico para cada uno 
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bd4cbe30-c288-44ac-a534-0c4d396c8b2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Filtering Data Based On Foreign Key

2019-05-21 Thread Gavin Boyle
Hi all,

I am having an issue dynamically populating form data based on the previous
selected field. In my case I have two models one which contains different
types of memberships associated to different clubs. Then I have another
model which handles registrations for individual clubs.

My problem - when the end-user is ready to sign up the form renders (I
already filter out members based on the club they originally selected) but
I need to filter the price based on the membership selected (foreign key)
of player model.

*Below is my model for the membership types:*

# Model to store clubs available memberships so members can select and
pay on registration page
class ClubMemberships(models.Model):

club_id = models.ForeignKey(ClubInfo, on_delete=models.CASCADE)
title = models.CharField(max_length=30, default='')
price = models.DecimalField(default=0.00, max_digits=6, decimal_places=2)
description = models.TextField()

def __str__(self):
return self.title


*Here is the model for the registration:*

# Model to store player information to be used for membership registration
class Player(models.Model):

club_id = models.ForeignKey(ClubInfo, on_delete=models.CASCADE)
membership_title = models.ForeignKey(ClubMemberships,
on_delete=models.CASCADE)
price = models.DecimalField(max_digits=10, decimal_places=2)
first_name = models.CharField(max_length=20)
last_name = models.CharField(max_length=20)
dob = models.DateField(max_length=8)
email = models.EmailField(max_length=50)
phone = models.CharField(max_length=12)
mobile = models.CharField(max_length=15)
emergency_contact_name = models.CharField(max_length=40)
emergency_contact_mobile = models.CharField(max_length=15)
address1 = models.CharField(max_length=30)
address2 = models.CharField(max_length=30, default='')
address3 = models.CharField(max_length=30, default='')
town = models.CharField(max_length=30)
county = models.CharField(max_length=30)
country = models.CharField(max_length=30)

def __str__(self):
return "%s %s" % (self.first_name, self.last_name)

*Form for player registration:*

# Form to accept details for members to register
class PlayerRegistrationForm(forms.ModelForm):

class Meta:
model = Player
fields = '__all__'
labels = {
'dob': 'Date of Birth'
}
widgets = {
'dob': forms.DateInput(attrs={'id': 'datepicker'})
}

def __init__(self, *args, **kwargs):
super(PlayerRegistrationForm, self).__init__(*args, **kwargs)
self.fields['club_id'].widget = forms.HiddenInput()

def load_price(self, request):
membership = request.GET.get('membership_title')
title = ClubMemberships.objects.filter(title=membership)
self.fields['price'].queryset =
ClubMemberships.objects.filter(price=title.price)


The load_price is an example of what I am trying to accomplish but cannot
get it working. I want the form to *check the membership selected* in the
*form* then *filter* the *price of that membership* and *display it in the
form*.

*Here is my form in the browser:*

[image: image.png]

Would really appreciate any help as I cannot incorporate PayPal until I can
correctly display the price.

Thanks

Gavin

-- 
__

Séanadh Ríomhphoist/_

Email Disclaimer__
**

Tá an ríomhphost seo agus 
aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus 
sin amháin é. Is féidir tuilleadh a léamh anseo. 
  
*
_

This e-mail and any 
files transmitted with it are confidential and are intended solely for use 
by the addressee. Read more here. 
 _
*_

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHZR7Jejvn2BrbY21EC_OQp1tFAye%2BvuichJn0k59OXi2R4mpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting "SMTPServerDisconnected: Connection unexpectedly closed: [Errno 104] Connection reset by peer" errors when using django.core.mail.send_mail in the loop

2019-05-21 Thread Asif Khan
I am facing similar error while I am rendering html template to PDF by 
using xhtml2pdf. Same when my template have small number of rows it works 
perfect to render as pdf but when my result fetch mutiple table rows it 
start processing and after couple of duration give error [Errno 104] 
Connection reset by peer. 

On Tuesday, June 28, 2016 at 7:56:04 PM UTC+5, Haomin Zhang wrote:
>
> Create a command like below, which send a mail to the user if the date 
> meet the requirement:
>
> class Command(BaseCommand):
> help= 'Send mail to user regularly if there have contacts needs 
> reminder'
> 
> def handle(self, *args, **options):
> now = timezone.now().date()
> backlogs = Backlog.objects.all()
> for backlog in backlogs.iterator():
> start_date = backlog.start_date
> end_date = backlog.end_date
> if start_date <= now and now < end_date:
> user = backlog.user
> user_email = user.email
> user_name = user.username
> if user_email is not None:
> mail_title = u'Contracts need to be handling.'
> mail_content = u"Dear:%s,you have messages" % user_name
> link = u"http://xx.xxx.xx.xxx/contract-info/;
> mail_content += link;
> mail_from = 'from_...@xx.com '
> mail_to = [user_email]
> send_mail(mail_title,
>   mail_content,
>   mail_from,
>   mail_to)
>
> This command can run well in local server. But when I launch it on the VPS 
> and if call send_mail more than once, below mesasge appear:
>
> "SMTPServerDisconnected: Connection unexpectedly closed: [Errno 104] 
> Connection reset by peer"
>
> But if only one backlog been filtered and only call once send_mail, it 
> works well.
>
> Does anybody met the issue before? thanks in advance!
>
> -Haomin
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3096908c-c517-481c-8053-d5863b42c1dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: LookupError: No installed app with label 'admin'.

2019-05-21 Thread kimeualexis
This error mostly has nothing to do with the admin. Try makemigrations and 
migrate.

On Monday, May 20, 2019 at 5:11:15 AM UTC+3, This is a test message wrote:
>
> Hi,
>
>  
>
> I am new to django and am trying out the tutorial. Get the following error:
>
>1. Create a virtual environment using anaconda
>2. Activate the virtual environment
>3. Create the project
>4. Get the following error when trying to start the server:
>
>  
>
> Directory of C:\Users\bradl\Documents\web sites\poll
>
>  
>
> 2019/05/19  02:25 PM  .
>
> 2019/05/19  02:25 PM  ..
>
> 2019/05/19  02:25 PM   645 manage.py
>
> 2019/05/19  02:26 PM  poll
>
>1 File(s)645 bytes
>
>3 Dir(s)  200 980 545 536 bytes free
>
>  
>
> (pollapp) C:\Users\bradl\Documents\web sites\poll>python manage.py 
> runserver
>
> Watching for file changes with StatReloader
>
> Exception in thread Thread-1:
>
> Traceback (most recent call last):
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\threading.py", line 917, 
> in _bootstrap_inner
>
> self.run()
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\threading.py", line 865, 
> in run
>
> self._target(*self._args, **self._kwargs)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\utils\autoreload.py",
>  
> line 54, in wrapper
>
> fn(*args, **kwargs)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\core\management\commands\runserver.py",
>  
> line 109, in inner_run
>
> autoreload.raise_last_exception()
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\utils\autoreload.py",
>  
> line 77, in raise_last_exception
>
> raise _exception[0](_exception[1]).with_traceback(_exception[2])
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\utils\autoreload.py",
>  
> line 54, in wrapper
>
> fn(*args, **kwargs)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\__init__.py", 
> line 24, in setup
>
> apps.populate(settings.INSTALLED_APPS)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\apps\registry.py",
>  
> line 114, in populate
>
> app_config.import_models()
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\apps\config.py",
>  
> line 211, in import_models
>
> self.models_module = import_module(models_module_name)
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\importlib\__init__.py", 
> line 127, in import_module
>
> return _bootstrap._gcd_import(name[level:], package, level)
>
>   File "", line 1006, in _gcd_import
>
>   File "", line 983, in _find_and_load
>
>   File "", line 967, in 
> _find_and_load_unlocked
>
>   File "", line 677, in _load_unlocked
>
>   File "", line 728, in exec_module
>
>   File "", line 219, in 
> _call_with_frames_removed
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\contrib\auth\models.py",
>  
> line 2, in 
>
> from django.contrib.auth.base_user import AbstractBaseUser, 
> BaseUserManager
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\contrib\auth\base_user.py",
>  
> line 47, in 
>
> class AbstractBaseUser(models.Model):
>
>  File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\models\base.py",
>  
> line 117, in __new__
>
> new_class.add_to_class('_meta', Options(meta, app_label))
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\models\base.py",
>  
> line 321, in add_to_class
>
> value.contribute_to_class(cls, name)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\models\options.py",
>  
> line 204, in contribute_to_class
>
> self.db_table = truncate_name(self.db_table, 
> connection.ops.max_name_length())
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\__init__.py",
>  
> line 28, in __getattr__
>
> return getattr(connections[DEFAULT_DB_ALIAS], item)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\utils.py", 
> line 201, in __getitem__
>
> backend = load_backend(db['ENGINE'])
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\utils.py", 
> line 110, in load_backend
>
> return import_module('%s.base' % backend_name)
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\importlib\__init__.py", 
> line 127, in import_module
>
> return _bootstrap._gcd_import(name[level:], package, level)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\backends\sqlite3\base.py",
>  
> line 28, in 
>
> from .introspection import DatabaseIntrospection# 
> isort:skip
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\backends\sqlite3\introspection.py",
>  
> line 4, in 
>
> import sqlparse
>
> 

Re: LookupError: No installed app with label 'admin'.

2019-05-21 Thread Chris Bartos
When in your virtual environment, if you run 'pip install django' it should 
install sqlparse automatically. If not, you have to install it manually. 
'pip install sqlparse'

On Sunday, May 19, 2019 at 10:11:15 PM UTC-4, This is a test message wrote:
>
> Hi,
>
>  
>
> I am new to django and am trying out the tutorial. Get the following error:
>
>1. Create a virtual environment using anaconda
>2. Activate the virtual environment
>3. Create the project
>4. Get the following error when trying to start the server:
>
>  
>
> Directory of C:\Users\bradl\Documents\web sites\poll
>
>  
>
> 2019/05/19  02:25 PM  .
>
> 2019/05/19  02:25 PM  ..
>
> 2019/05/19  02:25 PM   645 manage.py
>
> 2019/05/19  02:26 PM  poll
>
>1 File(s)645 bytes
>
>3 Dir(s)  200 980 545 536 bytes free
>
>  
>
> (pollapp) C:\Users\bradl\Documents\web sites\poll>python manage.py 
> runserver
>
> Watching for file changes with StatReloader
>
> Exception in thread Thread-1:
>
> Traceback (most recent call last):
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\threading.py", line 917, 
> in _bootstrap_inner
>
> self.run()
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\threading.py", line 865, 
> in run
>
> self._target(*self._args, **self._kwargs)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\utils\autoreload.py",
>  
> line 54, in wrapper
>
> fn(*args, **kwargs)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\core\management\commands\runserver.py",
>  
> line 109, in inner_run
>
> autoreload.raise_last_exception()
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\utils\autoreload.py",
>  
> line 77, in raise_last_exception
>
> raise _exception[0](_exception[1]).with_traceback(_exception[2])
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\utils\autoreload.py",
>  
> line 54, in wrapper
>
> fn(*args, **kwargs)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\__init__.py", 
> line 24, in setup
>
> apps.populate(settings.INSTALLED_APPS)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\apps\registry.py",
>  
> line 114, in populate
>
> app_config.import_models()
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\apps\config.py",
>  
> line 211, in import_models
>
> self.models_module = import_module(models_module_name)
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\importlib\__init__.py", 
> line 127, in import_module
>
> return _bootstrap._gcd_import(name[level:], package, level)
>
>   File "", line 1006, in _gcd_import
>
>   File "", line 983, in _find_and_load
>
>   File "", line 967, in 
> _find_and_load_unlocked
>
>   File "", line 677, in _load_unlocked
>
>   File "", line 728, in exec_module
>
>   File "", line 219, in 
> _call_with_frames_removed
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\contrib\auth\models.py",
>  
> line 2, in 
>
> from django.contrib.auth.base_user import AbstractBaseUser, 
> BaseUserManager
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\contrib\auth\base_user.py",
>  
> line 47, in 
>
> class AbstractBaseUser(models.Model):
>
>  File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\models\base.py",
>  
> line 117, in __new__
>
> new_class.add_to_class('_meta', Options(meta, app_label))
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\models\base.py",
>  
> line 321, in add_to_class
>
> value.contribute_to_class(cls, name)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\models\options.py",
>  
> line 204, in contribute_to_class
>
> self.db_table = truncate_name(self.db_table, 
> connection.ops.max_name_length())
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\__init__.py",
>  
> line 28, in __getattr__
>
> return getattr(connections[DEFAULT_DB_ALIAS], item)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\utils.py", 
> line 201, in __getitem__
>
> backend = load_backend(db['ENGINE'])
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\utils.py", 
> line 110, in load_backend
>
> return import_module('%s.base' % backend_name)
>
>   File "C:\Users\bradl\Anaconda3\envs\pollapp\lib\importlib\__init__.py", 
> line 127, in import_module
>
> return _bootstrap._gcd_import(name[level:], package, level)
>
>   File 
> "C:\Users\bradl\Anaconda3\envs\pollapp\lib\site-packages\django\db\backends\sqlite3\base.py",
>  
> line 28, in 
>
> from .introspection import DatabaseIntrospection# 
> isort:skip
>
>   File 
> 

Re: 'WSGIRequest' object has no attribute '

2019-05-21 Thread sagar ninave
my manage.py is in project folder you can check attachment

On Mon, May 20, 2019 at 5:42 PM Abu Yusuf 
wrote:

> Where is your manage.py file?
>
> On Mon, May 20, 2019 at 11:57 AM sagar ninave 
> wrote:
>
>>  AttributeError at /admin/  'WSGIRequest' object has no attribute 'user'
>> Request Method: GET Request URL: http://127.0.0.1:8000/admin/
>> Django Version: 2.2 Exception Type: AttributeError Exception Value:
>>   'WSGIRequest' object has no attribute '
>>
>>
>>
>>
>> i am getting this error please help me
>> i have attached zipfile of my project
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/eee17c55-c0ec-408d-bd54-10539e93cb9b%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACNsr28zF%2BgtfQ3_-07qjVPoCz6Hy03Bq0zAaazj3d86zknJJA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

sagar ninave
about.me/sagarninave


-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA6pdZ_WeaebY%3DHUAPN8ee4h7nrJSZx%3DsEM0h6ZjZ3tE76gXyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Write queryset containing request from middleware outside of django's views

2019-05-21 Thread valentin jungbluth
Hello guys,

I have a little question about request attribute in my function located in 
a menu.py file (not my view):

def list_of_edition(request):
""" Return list of editions
:return queryset
"""
instance = NavbarMenuSettings.objects.filter(application=request.cur_app
, display=True).order_by('order')
return instance

My request.cur_app is given by my middleware.py file:

class MultiSiteMiddleware:

def __init__(self, get_response):
self.get_response = get_response

def __call__(self, request):
request.cur_app = WebApplication.objects.get_current(request)
return self.get_response(request)

I would like to call list_of_edition() but I get each time the same issue:

TypeError: list_of_edition() missing 1 required positional argument: 
'request'

I would like to now How I can handle my function in order to use it outside 
of views.py file ? 
I'm blocked since a moment and I don't find any way to do that.

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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/82e53fad-87fd-49fe-bf1d-08f3941551ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-MQTT

2019-05-21 Thread PASCUAL Eric
Hi Sabuhi,

I wrote something similar a couple years ago, not involving Arduinos but using 
MQTT anyway.

The selected approach consisted in having a MQTT listener, based on paho-mqtt 
lib (https://pypi.org/project/paho-mqtt/), acting as a gateway to a REST API on 
the Django side, based on Django REST Framework. It worked pretty well and I 
have no special remembering of difficulties or trouble.

Hope this helps.

Eric


From: django-users@googlegroups.com  on behalf 
of Sabuhi Shukurov 
Sent: Monday, May 20, 2019 15:01
To: Django users
Subject: Django-MQTT

Hello Python Community!
I would like to to create a connection between the device(Arduino) and web 
server by using the MQTT protocol. As tools, we will use RabbitMQ, Django, and  
Django-channels for web socket. The device should communicate to the server by 
means of message broker in order to pass data to interface and should be 
possible to get back subscription by in case of any change on the interface.
I know them theoretically and cannot apply practically to Django.

--
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 post to this group, send email to 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53b73716-5aeb-4b86-9240-5af2a0be4275%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/HE1P193MB025000E7F0313B4087BB6F4B8C070%40HE1P193MB0250.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.