Monday, May 8, 2017

Re: Admin css question for 1.10.7

You need to clone the Django repository and run the bisect command from there: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/

That said, you might have some luck using the "Blame" button on https://github.com/django/django/blob/stable/1.9.x/django/contrib/admin/static/admin/css/forms.css
That'll take you take a page that shows the latest change for each line.

On Sunday, May 7, 2017 at 10:01:19 PM UTC-4, Mike Dewhirst wrote:
Tim

The problem does not exist in 1.8.18 and does exist in 1.9

Here is the test I wrote to see if the css file contains the problem
(which I established by trial and error) ...

# -*- coding: utf-8 -*-
import os
from django.test import TestCase
from django.contrib import admin


expected = "form .wide p, form .wide input + p.help {"


class TestBadCss(TestCase):

     def test_bad_css(self):
         base_css = 'static/admin/css/forms.css'
         exists = False
         stradmin = str(admin)
         pth = os.path.split(stradmin.split()[-1].split("'")[-2])[0]
         base_css = os.path.join(pth, base_css).replace("\\","/")
         #print("\n%s" % base_css)
         if os.path.isfile(base_css):
             lines = list()
             with open(base_css, "r") as base:
                 lines = base.readlines()
                 for line in lines:
                     exists = expected in line
                     if exists:
                         break
         self.assertEqual(exists, False)

I installed git and tried to do the bisecting thing but that didn't work
for me

(xxex3) C:\Users\mike\env\xxex3\ssds>git bisect bad
fatal: Not a git repository (or any of the parent directories): .git

Where should I go next?

Thanks

Mike

On 7/05/2017 8:12 PM, Tim Graham wrote:
> You can use git bisect to find the Django commit where the behavior
> changed:
> https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression
>
> On Saturday, May 6, 2017 at 11:05:14 PM UTC-4, Mike Dewhirst wrote:
>
>     I'm just (slowly) advancing from 1.8 to 1.11 and stopping for a short
>     while at 1.10.
>
>     I notice that help-text doesn't line up under the left edge of
>     DecimalField fields the way it does for TextFields and most others.
>
>     Is this a deliberate design decision?
>
>     Thanks
>
>     Mike
>

--
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+unsubscribe@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/ff638d8d-8d37-4772-a8b2-baa671a67beb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment