Commit Graph

556 Commits

Author SHA1 Message Date
Krukov D
e6236f79e6 Move the groups at class definition (#321) 2016-08-26 12:12:14 -07:00
Frank Pape
c8fdea6460 Add send_and_consume method to HttpClient to match base Client behavior. Change argument ordering in send method to match base client. Fix repeated "live cycle" error in docstrings. (#320) 2016-08-26 12:04:38 -07:00
Tim Watts
39339e66bc Remove invalid test. FileResponse requires a file object. (#311)
* Remove invalid test. FileResponse requires a file object.

* rm unused imports
2016-08-24 17:39:18 -07:00
Peter Schmidt
860da6e241 Testing Docs: Update import from Channel -> Group (#307) 2016-08-24 14:50:38 -07:00
Andrew Godwin
3e2444b9b9 Clarify tasks better 2016-08-23 20:13:20 -07:00
Andrew Godwin
f699d112b0 Fixed #309: Missed a double decode for header coalescing 2016-08-23 20:10:15 -07:00
Andrew Godwin
3cc6f744a6 Add contributing page to docs 2016-08-23 20:06:56 -07:00
Luke Hodkinson
9a7317f583 Add a link to django-cq. (#310)
* Use a mixin for common test-case code. This way we can have both
a regular channels test-case, and a transaction test-case, too.

* Adding a reference to django-cq.
2016-08-23 19:47:29 -07:00
AlexejStukov
fcb2875b53 fixed usage of group_names in *_change_receiver (#306)
* fixed usage of group_names in *_change_receiver

group_names was missing second arg (action)

* fixed group_names to include action

* made group_names a classmethod
2016-08-23 10:13:46 -07:00
Luke Hodkinson
6649afce8e Use a mixin for common test-case code. This way we can have both (#305)
a regular channels test-case, and a transaction test-case, too.
2016-08-20 17:53:54 -07:00
Tyson Clugg
57fa3bed67 Implement the data binding behaviour from Django DDP. (#301)
* Implement the data binding behaviour from Django DDP.

Correct dispatch of create/update/delete according to how group_names change
when compared between pre and post save/delete.

* Fix tests for databinding improvements.
2016-08-16 16:49:18 +10:00
Oskar Hahn
32568dc879 Start only one worker with the nothreading option. (#298)
Reuse the nothreading option of the runserver command to only start one
worker.
2016-08-15 11:18:24 +10:00
Francis Mwangi
fb2e9320c2 fixed typo (#296) 2016-08-14 12:08:00 +10:00
AlexejStukov
0f1ac3d08b Fix member serialization in WebsocketBindingWithMembers (#292)
* Fix member serialization in WebsocketBindingWithMembers

* pep fixes

* allow usage of 'dot'-notation in send_members

* replace dots for dictionary

* single quotes
2016-08-10 21:55:51 -07:00
Andrew Godwin
f682298341 Show daphne server logs in runserver 2016-08-05 22:17:59 -07:00
AlexejStukov
0bc1cee103 Easy application of decorators to Bindings (#281)
* Added get_handler

Added a get_handler method that applies decorators to the consumer-classmethod

* added imports for decorators

* Added get_handler to WebsocketBinding

* Fixed missing import

* channel_session_user defaults to True

* removed user-transfer from http

would only work in a connect-method

* removed unused import
2016-08-05 00:12:59 -07:00
Andrew Godwin
2d97ab2cc7 Releasing version 0.17.2 2016-08-04 16:55:43 -07:00
Flavio Curella
9bd8bcf652 pass subprotocols if defined (#282) 2016-08-04 15:30:52 -07:00
Andrew Godwin
a37238a769 Remove download badge, seems broken 2016-08-03 23:23:23 -07:00
Robert Roskam
fd74863ba4 Changed testproject, added tasks, updated docs (#284)
* Added in simple locust file

* Correcting the file name

* Updated to latest version of daphne

* moving settings up

* Moved over channels settings

* Removed channels settings

* Removed settings file

* Moved around files

* Made a file for normal wsgi

* Changed regular wsgi to point to channels settings

* Create __init__.py

* Added in the appropriate import

* Named it right

* Create urls_no_channels.py

* Delete urls_no_channels.py

* Doing this so I don't have to have multiple urls

* Update urls.py

* Update urls.py

* Added in fabric cmd for installing nodejs loadtest

* Added in git dependency

* Added in a symlink for loadtest

* Made run_loadtest command

* Added in argument for time

* Changed to format on string

* Updated arguments

* Fixed typo for argument

* Made some comments and moved around some tasks

* Edits to readme

* Add a lot more documentation

* Adjusted formatting

* Added a comment

* Made formatting cahnges

* Slight language change
2016-08-03 08:30:35 -07:00
Emett Speer
7d85dec8fa Updates to data binding docs (#283) 2016-08-02 17:33:07 -07:00
Raja Simon
04a1296222 Add beatserver to community projects (#275) 2016-07-28 19:26:47 +01:00
Andrew Godwin
4724ee4529 Mark WebsocketBindingWithMembers as abstract 2016-07-28 11:12:51 +01:00
Andrew Godwin
c2b6759ba4 Revert "Unpin flake8 now they pushed a new release"
This reverts commit 10eaa36c9c.
2016-07-28 11:05:48 +01:00
AlexejStukov
77f41ce1a9 Added WebsocketBindingWithMembers (#262)
* Added WebsocketBindingWithMembers

WebsocketBindingWithMembers inherits WebsocketBinding and additionally enables sending of member variables, properties and methods.

* pep fixes

* pep fixes

* Changed to Mixin

More flexible this way; also checking if members are callable now, not just a try-except.

* moved BindingWithMembersMixin to base.py

* moved BindingWithMembersMixin to base.py

* undo moving to base.py

* undo moving to base.py; undo Mixin

* use DjangoJSONEncoder to serialize members

* missing self

* removed nasty whitespace
2016-07-28 10:55:28 +01:00
Andrew Godwin
10eaa36c9c Unpin flake8 now they pushed a new release 2016-07-28 10:50:03 +01:00
Andrew Godwin
d027c57dbf Fix typo in attrs error message 2016-07-28 10:49:37 +01:00
Krukov D
d9a943a2d5 as_route method for class based consumers (#266)
* Relative imports at the base of generic

* Added as_route method to generic consumers

* Tests for as_route method for generic consumers

* Now as_route method does not create new object + less verbose creating new object (tests)

* Fix flake8 version

* Fix blank line (flake8)

* Separate kwargs of as_route method as filters and nonfilters kwargs.

* `kwargs` for filters and `attrs` for class body at `as_route` method
2016-07-28 10:48:57 +01:00
Andrew Godwin
b4263d0f1b Merge pull request #273 from the-kid89/fix_272
Fixed issue 272
2016-07-27 16:25:18 +01:00
Emett Speer
33ec92777f Added fix from pull 266 2016-07-27 08:21:20 -07:00
Emett Speer
efee5e0d34 Fixed issue 272 2016-07-26 17:05:18 -07:00
Andrew Godwin
fab6bd0536 Merge pull request #267 from Krukov/master
Improvements, fix and tests
2016-07-25 05:07:28 -04:00
Krukov Dima
72039cd3e9 A few tests for binding (outbound) 2016-07-24 13:13:21 +00:00
Krukov Dima
05b0073d8e Fix calling class registration 2016-07-24 13:11:58 +00:00
Krukov Dima
a3e779fe9c Json encoding/decoding for send/receive content at the HttpClient 2016-07-24 13:10:57 +00:00
Krukov Dima
3c03b44af7 Added method join_group to the test Client 2016-07-24 13:08:31 +00:00
Andrew Godwin
04cfafeaf5 Releasing 0.17.1 2016-07-22 21:57:26 -04:00
Andrew Godwin
b76bf3c1cc Add worker_ready signal 2016-07-22 21:51:28 -04:00
Andrew Godwin
a4c8602ea1 Move fields check to register so it happens on server start 2016-07-22 21:40:51 -04:00
Andrew Godwin
174430c817 fields update for binding 2016-07-22 21:36:41 -04:00
Andrew Godwin
8c6050fbba Merge pull request #264 from AlexejStukov/patch-10
Security fix - every field of a model is send - even password
2016-07-22 21:32:32 -04:00
Andrew Godwin
9f6ea22eff Add twisted/asyncio extensions to ASGI 2016-07-22 15:12:16 -04:00
Andrew Godwin
0954829248 A few more docs on polls 2016-07-22 11:14:47 -04:00
AlexejStukov
4625266db6 raise error if self.fields is empty 2016-07-22 08:17:49 +02:00
AlexejStukov
6eda634746 whitespace 2016-07-21 21:08:47 +02:00
AlexejStukov
d07600f04b Security fix - every field of a model is send - even password
Atm WebsocketBinding sends every field of a model, even the password of a user. Users of the class should have to think about which fields they want to send to the user. Also added a more intuitive option for sending all fields.
2016-07-21 21:06:25 +02:00
Andrew Godwin
4d580c2575 Merge pull request #263 from slick666/contribution_document
Contribution document
2016-07-21 13:08:12 -04:00
Landon Jurgens
5969bbd0f3 Initial implementation of the contribution file
Added IDE/TOOLS section to .gitignore
2016-07-21 12:21:12 -04:00
Andrew Godwin
91e1daa77c Add code to websocket.disconnect 2016-07-21 11:53:28 -04:00
Andrew Godwin
435fd89be8 Merge pull request #261 from AlexejStukov/patch-8
move encoding from serialize to trigger_outbound
2016-07-21 11:30:48 -04:00