Re: Ability to migrate other applications

2015-09-04 Thread Marten Kenbeek
Hi Emmanuelle,

I think the main problem is the dependencies between migrations. The order 
in which migrations 
are run is not fixed. It depends on which migrations have already run, and 
we can't guarantee the 
same order for each deployment. If each chain of migrations that could act 
on a single model has 
a fixed order, it's not much of a problem. Once each app can act on each 
model, it becomes a big, 
and possibly unsolvable problem. I think the scenario you present as an 
edge-case, where two 
migrations from different apps affect the same field, is the exact case we 
have to watch for, which can 
cause significant problems in how we handle migrations. 

If we are to "solve" this, I think Markus's idea it the best solution. If 
you can make all the migrations in
a single app affect the same app (which doesn't have to be the app that 
contains them), you can make 
consistent rules on the order in which all migrations that affect the 
target app are run. Once you have 
that, it's not that different from the current situation: each migrated app 
has a single chain of migrations 
that have to be applied, with several inter-app dependencies that are 
resolved at runtime. 

The inter-app dependencies might be difficult, but at least they are 
solvable. I have reasons to believe that if 
you allow each migration file to target a different app, it becomes an 
unsolvable dependency problem. If you'd 
like I can do some more research to come to a definite conclusion. 

If anything, I think Tim's solution is still the best solution; if you have 
to manually copy the migrations to an app 
within your project, it is very clear that you need to do something when 
the third-party app publishes some 
new migrations that could conflict with the order in which the migrations 
would currently be applied. Once you 
have that in mind, it's not that much trouble to copy and merge any new 
migraitons, and I think it will save a lot of
headaches if we only allow inter-app migrations through the 
MIGRATION_MODULES settting. 

Marten

Op vrijdag 4 september 2015 08:28:48 UTC+2 schreef Emmanuelle Delescolle:
>
>
>
> On Friday, 4 September 2015 00:29:28 UTC+2, Shai Berger wrote:
>>
>> What Markus (and myself) assumed is that when you add the "migrated_app" 
>> attribute, you make the migration belong to the migrated app. What you 
>> did is 
>> different: The migration still belongs to the app it is defined in, it is 
>> only 
>> the operations in it that "belong" to the migrated app. 
>>
>
> People can actually do that today out of the box by adding those 2 lines 
> to the generated migration when moving it:
>
>> def __init__(self, name, app_label):
>> super(Migration, self).__init__(name, 'other_third_party_app')
>
> But that would break everything (It would counter-intuitively work on that 
> migration but would break right after that), It wouldn't even generate a 
> merge migration. Because the models the migration is working on would not 
> be loaded.
>
>
>> This is evidenced both by the printing ("Applying unruly.0001_initial" 
>> etc) 
>> and by the handling of leaf migrations: 
>>
>  
> No need to show me evidence, that's exactly what I am trying to do (but 
> thanks for pointing out it does work as intended)
>
> What this all means is, your patch *subverts* the dependency checks, 
>> allowing 
>> more than one leaf migration on an app (and forcing a single leaf 
>> migration 
>> where it shouldn't -- there should be no requirement for dependencies 
>> among 
>> the "unruly" migrations). This makes things even more fragile than you 
>> implied: I think after you move your migration from the original app 
>> (say, 
>> "pizzas") to your "unruly",
>
>
> You can call it perverting if you like what, it does is just say "hey this 
> migration belongs to unruly" because, that's true, this migration should 
> belong to the app that created it. But it's working on the models from 
> pizzas (because that's also what it's doing) that way, the migration 
> framework knows not to load the models from unruly but from pizzas instead.
>  
>
>> if you "makemigrations pizzas" again it will be 
>> generated again. Which means, if you have two "unruly" apps, the 
>> interactions 
>> between them become, let's say, interesting. 
>>
>  
> Interesting indeed, since screenshots work better than words or code 
> samples, please take a look at the attached screenshot.
> The reason it doesn't create a new migration is the same reason why it 
> created a migration for an app to which you didn't change a line of code in 
> the first place: the state of the model is the same state as the one 
> computed by the migration system and whether it's the maintainer of pizzas 
> (who doesn't have the unruly app in their project) or the owner of the 
> current project (who's current model's state correspond to the one 
> generated by the unruly migration) who runs that command, the model state 
> is still the same as the state generated by the migratio

Re: Password validation in Django revisited

2015-09-04 Thread Markus Holtermann
Hey,

while I like the idea of having the validation in all places to not forget 
one that might be user facing, I was surprised by the fact that the 
validation also happens in dev environments when you create the superuser 
(this whole mail applies to the changepassword command, too):

$ python manage.py createsuperuser
Username (leave blank to use 'markus'):
Email address: 
Password:
Password (again):
This password is too short. It must contain at least 8 characters.
Password:
Password (again):
The password is too similar to the email address.
Password:


This is a bit annoying for me, given that I normally use "markus" or 
"admin" as username and password for the superuser and u1:u1, as 
username:password combination for additional users.

There are a few solutions to that behavior I'd like to see revisited for 
1.9:

   1. Disable password validation when DEBUG=True -- I don't think we 
   really want that
   2. Don't have password validation for createsuperuser/changepassword: I 
   personally don't see the benefit for that in the command anyways.
  1. In production environments I would expect the admins having access 
  to the management command to know their regulations (after all, they need 
  to configure them) and to know what good passwords are. 
  2. As somebody who is able to run the "createsuperuser" command I 
  figure I can also run "shell", giving me unlimited access to the password 
  field of users, allowing me to set a password that doesn't match the 
  requirements.
  3. It breaks backwards compatibility with tools like Expect 
  (https://en.wikipedia.org/wiki/Expect -- yes, I had to use that in the 
past)
   3. Disable validation when passing --no-validate or 
   --no-validate-password to createsuperuser, though this is still backwards 
   incompatible and a lot to type -- I'd better of with having a valid 
   password -- or the other way around, passing --validate / 
   --validate-password, but this feels pointless

My preference is definitely (2), though I'm sorry for not bringing this up 
earlier when the issue was created.

The original issue: https://code.djangoproject.com/ticket/25089
Respective PR: https://github.com/django/django/pull/5073

Cheers,

/Markus

On Thursday, July 9, 2015 at 6:13:18 PM UTC+10, Alex Becker wrote:
>
> Hi Erik,
>
> I've written such a patch, which also fixes an html escape bug and adds 
> validation to the auth management commands.
> The pull request is here .
>
> Sincerely,
>
> Alex
>
> On Friday, June 26, 2015 at 3:19:30 AM UTC-5, Erik Romijn wrote:
>>
>> Hi Alex, Carl, 
>>
>> On 22 Jun 2015, at 02:43, Carl Meyer  wrote: 
>> > On 06/21/2015 06:17 PM, Alex Becker wrote: 
>> >> With the PR merged, password validation applies to the SetPasswordForm 
>> >> and the password changing forms, but not to the UserCreationForm or to 
>> >> the creation of superusers. Is there a reason not to apply validation 
>> to 
>> >> these as well? 
>> > 
>> > Certainly makes sense to me to add validation to both of these. I 
>> missed 
>> > it in review. Erik, is there a reason you didn't, or was it just an 
>> > oversight? 
>>
>> No reason at all. I hadn’t even realised there was such a form. It seems 
>> sensible to add it (along with a test), but I don’t have time to make the 
>> patch currently. 
>>
>> Erik
>
>

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9860adf7-b0b3-492d-b8a0-f08c7b85b587%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: status of 1.9 release blockers

2015-09-04 Thread Tim Graham
Status with 2 weeks and a weekend to go until alpha (Monday, September 21).

Planned major features for 1.9:

PostgreSQL Full Text Search (Marc Tamlyn)

I haven't seen any recent activity on the pull request, nor have I heard 
anything from Marc about it.
https://github.com/django/django/pull/4726

Custom indexes (Marc Tamlyn)

I haven't see any work on revising the DEP, so this seem out for 1.9.

https://github.com/django/deps/pull/6

Template-based widget rendering (Preston Timmons)
I think the code is in fairly good shape. It seems the main work left to is 
to write documentation.
https://github.com/django/django/pull/4848

Release blockers:

- Add Oracle support for new-style GIS functions
https://code.djangoproject.com/ticket/24688
Owner: Jani Tiainen
Status: In progress (from recent IRC discussion, it sounds like Jani is 
making good progress)

On Monday, August 24, 2015 at 3:40:22 PM UTC-4, Tim Graham wrote:
>
> Time to kickoff the progress tracker for the next major release!
>
> Here's the status with 4 weeks to go until alpha (September 21).
>
> Release blockers:
>
> - Add Oracle support for new-style GIS functions
> https://code.djangoproject.com/ticket/24688
> Owner: Jani Tiainen
> Status: In progress (test suite runs on Oracle now, which is an 
> improvement from last week)
>
>
> Other tickets tagged for 1.9:
>
> - No way to create tables for apps without migrations
> https://code.djangoproject.com/ticket/25144
> Status: Awaiting replies to "Keeping apps without migrations?" thread for 
> a decision on what to do
> Mailing list thread: 
> https://groups.google.com/d/topic/django-developers/qHP4ZQSK9xM/discussion
> Owner: pending discussion
>
> - Replace admin icons images by inline SVG
> https://code.djangoproject.com/ticket/20597
> Owner: elky
> Status: In progress
>
> - Update tutorial screenshots for new admin theme
> https://code.djangoproject.com/ticket/25200
> Status: to be done after previous item is completed
>
>
> Relevant ticket filters:
>
> Release blockers affecting master:
>
> https://code.djangoproject.com/query?status=assigned&status=new&version=master&severity=Release+blocker
>
> Tickets tagged 1.9:
>
> https://code.djangoproject.com/query?status=assigned&status=new&keywords=~1.9
>

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fb2252d7-5bc0-4807-9c69-a9545163b031%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django with Pycharm

2015-09-04 Thread Tim Graham
Hi, This is off-topic for the django-developers mailing-list, which is 
dedicated to the development of Django itself. Please send questions like 
this to django-users. Thanks!

On Friday, September 4, 2015 at 11:07:11 AM UTC-4, Nick Sarbicki wrote:
>
> Hi Prabhu,
>
> Are you using the community or professional version?
>
> The community version doesn't support specific Django projects (although 
> it is still good to use).
>
> https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html
>
> Nick.
>
> On Fri, Sep 4, 2015 at 3:47 PM Prabhu > 
> wrote:
>
>> Hi Team,
>>
>> I'm Prabhu new to django, i'm trying configure to debug django appication 
>> using pycharm.
>>
>> I could not locate/select project type as "Django" 
>>
>> Please hep me out to resolve this issue to move forward to debug my 
>> project.
>>
>> Using Ubuntu 15.04, Django,Pycharm & Python installed 
>>
>> Thanks and Regards,
>>
>> Prabhu
>>
>> -- 
>> 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-develop...@googlegroups.com .
>> To post to this group, send email to django-d...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/62d50e77-ba53-4da5-bf07-326ee89fd75e%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>  - Nick
>

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/77f58850-a4b6-4b52-94c5-1b5920684892%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django with Pycharm

2015-09-04 Thread Nick Sarbicki
Hi Prabhu,

Are you using the community or professional version?

The community version doesn't support specific Django projects (although it
is still good to use).

https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html

Nick.

On Fri, Sep 4, 2015 at 3:47 PM Prabhu  wrote:

> Hi Team,
>
> I'm Prabhu new to django, i'm trying configure to debug django appication
> using pycharm.
>
> I could not locate/select project type as "Django"
>
> Please hep me out to resolve this issue to move forward to debug my
> project.
>
> Using Ubuntu 15.04, Django,Pycharm & Python installed
>
> Thanks and Regards,
>
> Prabhu
>
> --
> 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 http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/62d50e77-ba53-4da5-bf07-326ee89fd75e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
 - Nick

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAGuvt90rePWrS9uRe1XSEg1nH0G9VXoM81S4naDEJox%2B%3DZfv8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django with Pycharm

2015-09-04 Thread Prabhu
Hi Team,

I'm Prabhu new to django, i'm trying configure to debug django appication 
using pycharm.

I could not locate/select project type as "Django" 

Please hep me out to resolve this issue to move forward to debug my project.

Using Ubuntu 15.04, Django,Pycharm & Python installed 

Thanks and Regards,

Prabhu

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/62d50e77-ba53-4da5-bf07-326ee89fd75e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin New Look

2015-09-04 Thread elky
Thanks for clarification, Collin.

On Friday, 4 September 2015 17:38:05 UTC+5, Collin Anderson wrote:
>
> That looks right to me. More specifically (from the attic/magic-removal 
> branch):
> Added css and some of those html classes:
>
> https://github.com/django/django/commit/84b7590ba6e566186bba975e57b0686dd53927ca
> Removed html classes, but not css:
>
> https://github.com/django/django/commit/738d9af1e8e38b0289b7dfa7c8a5413f5d0e20d1
>

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/70660656-c492-43c0-94f4-a1533a20d86b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin New Look

2015-09-04 Thread Collin Anderson
That looks right to me. More specifically (from the attic/magic-removal
branch):
Added css and some of those html classes:
https://github.com/django/django/commit/84b7590ba6e566186bba975e57b0686dd53927ca
Removed html classes, but not css:
https://github.com/django/django/commit/738d9af1e8e38b0289b7dfa7c8a5413f5d0e20d1

On Fri, Sep 4, 2015 at 5:35 AM, elky  wrote:

> Does anybody know where this CSS code (
> https://github.com/elky/django/commit/36c1decd2f18c3af947546ea3b8eaeaecd2762ba)
> uses? I didn't find any mention of these CSS classes in the project.
>
> The first mention of these styles came from this 9 years old commit -
> https://github.com/django/django/commit/f69cf70ed813a8cd7e1f963a14ae39103e8d5265
> I did checkout to this state and didn't find any mention of these classes
> in backend or JS. So I think this code is really unused. Correct me if I'm
> wrong.
>
> --
> 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 http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/59b2377d-bc7f-4465-9588-2641746ac466%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 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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFO84S7mh39QHe6__aF-c1_J8rBLaMa-RNibzENzLjJOyUM2Mw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin New Look

2015-09-04 Thread elky
Does anybody know where this CSS code 
(https://github.com/elky/django/commit/36c1decd2f18c3af947546ea3b8eaeaecd2762ba)
 
uses? I didn't find any mention of these CSS classes in the project.

The first mention of these styles came from this 9 years old commit 
- 
https://github.com/django/django/commit/f69cf70ed813a8cd7e1f963a14ae39103e8d5265
I did checkout to this state and didn't find any mention of these classes 
in backend or JS. So I think this code is really unused. Correct me if I'm 
wrong. 

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/59b2377d-bc7f-4465-9588-2641746ac466%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.