Re: Swappable sessions

2020-04-18 Thread Lorenzo Peña
Fair enough, Tim. Thanks for answering!

El miércoles, 15 de abril de 2020, 18:29:24 (UTC-4), Tim Graham escribió:
>
> I don't see a strong argument for adding it. As far as I can tell, this 
> would require adding 'request' to the signature of SessionStore.__init___() 
> (so it could be stored as an attribute on SessionStore and thereby 
> available in create_model_instance()). Backwards compatibility would be 
> non-trivial and coupling the session store to the request seems unnecessary.
>
> On Wednesday, April 15, 2020 at 5:38:18 PM UTC-4, Lorenzo Peña wrote:
>>
>> Yes, of course. I am already working things around in order to get what I 
>> need.
>>
>> Now, the database backed SessionStore defines a method 
>> "create_model_instance(self, data)" which is called from 
>> "django.contrib.sessions.middleware.SessionMiddleware". Django docs invite 
>> to redefine this method in order to populate the custom session with the 
>> required data.
>>
>> My question is: would it be okay to formally ask that the request object, 
>> which is already available there, be passed to that method when called, 
>> like " create_model_instance(self, data, request=None)"?
>>
>> El miércoles, 15 de abril de 2020, 17:01:30 (UTC-4), Tim Graham escribió:
>>>
>>> Can't you copy whatever data you want from the request into the session 
>>> data (request.session. = request.) in a view, 
>>> middleware, or wherever? That seems like the proper separation of concerns.
>>>
>>> On Wednesday, April 15, 2020 at 11:50:13 AM UTC-4, Lorenzo Peña wrote:

 Now, in order to follow the path suggested in the Django documentation 
 for overriding database backed sessions, some of the data one might need 
 to 
 store in the session model is coming from the request, and Django is not 
 passing the request when instantiating the session store.

 Do you think there is a point in requesting that the request object (if 
 available) is passed as an optional parameter when creating the session?

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f9cb-77a4-4b0a-8fb4-5befa8c69fa9%40googlegroups.com.


Re: Pycharm Not Generating Django files when created with App Engine

2020-04-18 Thread kelvin smith
I just realized that, thanks.

On Saturday, April 18, 2020, at 5:47:30 AM UTC-5, Abhijeet Viswa wrote:
>
> Hi!
>
> I think you've found the wrong mailing list for this post. This mailing 
> list is for discussing the development of Django itself, not for support 
> using Django. This means the discussions of bugs and features in Django 
> itself, rather than in your code using it. People on this list are unlikely 
> to answer your support query with their limited time and energy.
>
> For support, please follow the "Getting Help" page: 
> https://docs.djangoproject.com/en/3.0/faq/help/
>
> Thanks for understanding and all the best,
>
> Abhijeet
>
> On Sat, 18 Apr 2020 at 16:13, kelvin smith  > wrote:
>
>> I have been stuck on this problem for a while now please I need your help.
>>
>> Steps followed to create the project:
>>
>> Step:1
>>
>> [image: Screen Shot 2020-04-18 at 1.08.29 AM.png]
>> Step:2
>>
>> [image: Screen Shot 2020-04-18 at 1.08.19 AM.png]
>> output:
>>
>> [image: Screen Shot 2020-04-18 at 1.10.07 AM.png]
>> missing Django files
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-d...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/670f7e23-a56e-4502-b0b9-b2bd1b63118d%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Abhijeet
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/40b0cb00-0140-41b6-b28f-b7ce064cf8da%40googlegroups.com.