Re: [Feature Request] django-admin migrate - skip feature

2018-12-30 Thread Fábio Molinar
Hi Adam,
Thank you for mentioning that. Someone has already posted an answer to my
post which fixed my issue. In fact, it was my bad since I simply missed
updating one of the methods of my router.

Em qui, 20 de dez de 2018 15:47, Adam Johnson  escreveu:

> There's a new answer on your stack overflow post that I think answers your
> question: https://stackoverflow.com/a/53870659/1427135 . The database
> router can already do it :)
>
> On Thu, 20 Dec 2018 at 07:23, Fábio Molinar 
> wrote:
>
>> Hi,
>>
>> I have a project with two apps (app1, app2). App1's DB is the default DB.
>> App2's DB is DB2. To run the migrations on DB2, I need to run:
>>
>> python manage.py migrate app2 --database=DB2
>>
>> Which is ok. The problem is to run the migrations for the rest of the
>> project. I would like to run all migrations with the exception of app2's
>> migrations on the default DB. To do that, I need to run every single app
>> migration separately, with the exception of app2's migration. It would be
>> great if I could type something like this instead:
>>
>> python manage.py migrate --skip=app2
>>
>> And that command would run all other migrations on the default DB with
>> the exception of app2's migrations.
>>
>> I posted a question on stackoverflow regarding this:
>> https://stackoverflow.com/questions/53850114/migrate-command-create-all-tables-on-second-db-django
>>
>> And I hope this is the correct mail-list to ask for a feature.
>>
>> Regards,
>> Fabio
>>
>> --
>> 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 post to this group, send email to django-developers@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/791a11e9-8848-4c96-a4b6-0c8bfcbf55cd%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Adam
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-developers/b5lNv_DjUpA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAMyDDM0KSRkypMZJx9FCC_U6v6dxr8s4HsGced%3DyEVu1cCjP3w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Fábio Thomaz Molinar

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


Re: CSRF Middlware and usage of request attributes (META, csrf_cookie_needs_reset)

2018-12-30 Thread Adam Johnson
>
> Unless we documented the attributes/keys I'd consider it an implementation
> detail of the middleware.


Fair enough, I think I'm becoming a bit too conservative :)

On Sat, 29 Dec 2018 at 22:13, Florian Apolloner 
wrote:

> Hi Adam,
>
> On Saturday, December 29, 2018 at 7:59:44 PM UTC+1, Adam Johnson wrote:
>>
>> since request.META is always there whilst attributes might not be if the
>> middleware aren't set up properly?
>>
>
> request.META is always there, but the keys inside there might not be. In
> that sense you have to do "key in request.META" like we do with
> "hasattr(request, key)" if you are not sure on whether process_request of
> the middleware did actually set that stuff.
>
>
>> It seems like it could just be oversight. I would think that moving would
>> require a standard deprecation period.
>>
>
> Unless we documented the attributes/keys I'd consider it an implementation
> detail of the middleware.
>
> Cheers,
> Florian
>
> --
> 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 post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/fa76d5eb-68c6-4f9d-859d-3eb48011ae23%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Adam

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