jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 294 forks source link

Please test upcoming version of django-angular 2.0 #322

Closed jrief closed 6 years ago

jrief commented 6 years ago

Exciting news from the core maintainer of django-angular: Version 2.0 is about of being released.

Please help me to review this pull request https://github.com/jrief/django-angular/tree/releases/2.0.x and have a look at the site explaining its features interactively: https://django-angular.awesto.com/model_scope/

adrienbrunet commented 6 years ago

I think the documentation about "Running the demo" should mention pip install -e ..

Also, I think pyquery is missing from the example's requirements.

Then, there is 1 failing test and 2 warnings :

(djng) ~/projects/django-angular/examples:master ★  ./manage.py  test                                                                                                                                                            12:21:28
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
.........................../home/adrien/projects/django-angular/djng/sekizai_processors.py:27: UserWarning: This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using `{% with_data "ng-config" ... %}`
  warnings.warn("This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using `{% with_data \"ng-config\" ... %}`")
./home/adrien/projects/django-angular/djng/sekizai_processors.py:20: UserWarning: This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using `{% with_data "ng-requires" ... %}`
  warnings.warn("This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using `{% with_data \"ng-requires\" ... %}`")
..............................E...........
======================================================================
ERROR: test_radio_field (server.tests.test_validation_forms.NgFormValidationMixinTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/adrien/projects/django-angular/examples/server/tests/test_validation_forms.py", line 100, in test_radio_field
    self.assertEquals(label.text.strip(), "Female")
AttributeError: 'NoneType' object has no attribute 'text'

----------------------------------------------------------------------
Ran 70 tests in 0.993s

FAILED (errors=1)
Destroying test database for alias 'default'..
adrienbrunet commented 6 years ago

We could also add the step:

npm install in "Running the demo"

jrief commented 6 years ago

Thanks @adrienbrunet I'll check why we have a deviation here. On Travis everything seems to work.

maltitco commented 6 years ago

./manage.py test

Creating test database for alias 'default'... System check identified no issues (0 silenced). .........................

../Users/malt/django-angular/djng/sekizai_processors.py:27: UserWarning: This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using {% with_data "ng-config" ... %} warnings.warn("This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using {% with_data \"ng-config\" ... %}") ./Users/malt/django-angular/djng/sekizai_processors.py:20: UserWarning: This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using {% with_data "ng-requires" ... %} warnings.warn("This postprocessor is deprecated. Read on how to resolve AngularJS dependencies using {% with_data \"ng-requires\" ... %}") .................. ............E...........

ERROR: test_radio_field (server.tests.test_validation_forms.NgFormValidationMixinTestCase)

Traceback (most recent call last): File "/Users/malt/django-angular/examples/server/tests/test_validation_forms.py", line 98, in test_radio_field self.assertEquals(label.text.strip(), "Female") AttributeError: 'NoneType' object has no attribute 'text'


Ran 70 tests in 1.314s

FAILED (errors=1) Destroying test database for alias 'default'...

jrief commented 6 years ago

OK. Changed the docs to invoke py.test or tox.

So, @maltitco from your point of view everything is OK for releasing version 2.0?

maltitco commented 6 years ago

@jrief I found first issue nagranie ekranu 2017-11-15 o 16 52 27

And still testing...

maltitco commented 6 years ago

second issue with Ajax button nothing happen. nagranie ekranu 2017-11-15 o 17 04 41

@jrief more bugs I did not find, you will only have to add the information wrote @adrienbrunet to the documentation.

jrief commented 6 years ago

The first issue is solved.

I presume that the second one, is not a real issue. Could you please retry locally and check if you see an error message above. Remember that the combination "John Doe" is rejected. If that's the case, I agree however that it's not the best user experience. Then I have to rethink how to improve it.

@maltitco Thanks anyway and please retry.

jrief commented 6 years ago

@maltitco I have found a solution for the second problem, provided it is the problem I assumed. Check the branch releases/2.0.x

maltitco commented 6 years ago

@jrief in /model_scope/ form Submit via Ajax don't work:

nagranie ekranu 2017-11-16 o 09 38 46

She same is in combined_validation in console TypeError: the JSON object must be str, not 'bytes'

  1. File upload
    • you can do drag and drop other file than pdf.
    • after deleting files are not deleted from the folder
    • send button does nothing

nagranie ekranu 2017-11-16 o 09 51 32

jrief commented 6 years ago

@maltitco About File upload

maltitco commented 6 years ago

On my local: model_scope Submit via Ajax:

File "/Users/malt/test/django-angular-46d159564f34da7f6c8b0c46e1f0176008864cfd/examples/server/views/model_scope.py", line 22, in ajax request_data = json.loads(request.body) File "/Users/malt/.pyenv/versions/3.5.4/lib/python3.5/json/init.py", line 312, in loads s.class.name)) TypeError: the JSON object must be str, not 'bytes' [2017-11-16 12:46:45,878 basehttp] ERROR: "PUT /model_scope/ HTTP/1.1" 500 13806

When it comes to uploading files it was missing npm install ng-file-upload.