When Daphne is installed, a daphne command is available which starts theDaphne server process. At its simplest, Daphne needs to be called with thelocation of a module containing an ASGI application object, followed by whatthe application is called (separated by a colon).
I am facing issues using Django Channels with Daphne with Nginx. The below daphne command line works fine wherein I can connect to both HTTP and websocket route. However if I use nginx it works fine with HTTP, however websocket route shows connection failed.
Another thing to note is that I am using Django User Model authentication and when I login with any user, I see the username displayed in the HTTP route, however when I switch to websocket route after login, the username does not show as HTTP user session information is lost. Any better solutions how to use both HTTP and Websocket together?
Thanks for your reply. I copied my settings from the official channels doc and looks like it got messed up. I have corrected it. The private address are just for testing and will be changed so they cannot be reached from internet as they are behined a FW.
I read the documentation however cannot find how to pass the HTTP user session information to websocket route. In the docs it does mention about using self.scope["user"], however looks like this is strictly for using authentication in channels itself. My use case is related to passing the already available user information from HTTP route to websocket route.
This evergreen shrub is also commonly called fragrant daphne or winter daphne. As a member of the Thymaleaceae plant family, daphne are one of 50 genera and 900 species that share some unusual traits, including shiny, fibrous bark that peels rather than breaks. The flower structures are also unique, and sometimes confusing. Daphne can be difficult to distinguish from its close relative Wikstroemia, which has led some scientists to question the validity of the genera names. One close relative that I highly recommend for southern gardeners is the oriental paper bush, Edgeworthia. Learn more about this fragrant winter bloomer here.
Oddly enough, thyme, the common culinary herb, is NOT a member of the Thymaleaceae plant family. That is instead a part of the much larger Lamiaceae or mint family. Yes, sometimes binomial nomenclature can be quite counter intuitive. Nevertheless, I am fascinated by it!
Since I am going down a nerdy rabbit hole, I may as well explain the origins of the genus name. Daphne is derived from the Roman myth about a naiad nymph associated with freshwater including fountains, well, springs, and streams. Beautiful Daphne became the unwilling object of affection of Olympian god Apollo after Cupid put a spell upon him with an arrow. She prayed to her father Peneus, the river god, for help as Apollo attempted to kiss her. In that moment she was transformed into a laurel tree and the curse on a lovesick Apollo remained.
Winter daphne is a broad leaf evergreen that grows in full sun to partial shade. It is hardy in zones 7-9, though I have seen it growing well in colder climates with protected locations. Just remember, the key to success is drainage.
Daphne do not react well to root disturbance and transplant badly, so when you pick a spot in your garden plan for it to stay there! Unlike most other plants, don't pull the roots apart when planting. Instead, gently remove the pot, drop it in a hole amended with Soil compost, and walk away. I am serious! The more you touch the roots, the higher the chance for sudden death syndrome.
Additionally, Daphne odora are highly susceptible to root rot, specifically, Phytophthora which is a fungus-like microorganism that survives as hyphae in the roots of diseased plants and debris. It is easily spread in contaminated potting soil and by splashing or flowing water, like heavy rain or irrigation. To reduce the spread of disease be sure to apply a light layer of mulch or gravel to cover any bare soil.
Some of the happiest daphne that I have witnessed have been in one of two places: under a large oak tree that is absorbing every drop of water, or near a street in full sun growing high and dry. If you have a spot like either of those, daphne just may be a dream come true for you.
Since I live in a low laying, sandy, almost always wet environment, daphne has proven to be a better container plant. Pots offer a great opportunity to grow daphne because you can control the placement and the amount of water the plants receive. Consider growing a daphne under the cover of a roof, like on your front porch. This will ensure it will stay dry even in the heaviest of rainstorms.
The straight species remains my favorite because it seems to be the easiest to grow. With solid green leaves and white flowers this old fashioned daphne can be difficult to find at nurseries. However, they are commonly found growing at old cemeteries and homesteads.
More than anything, I hope these plant profiles will serve as a resource and inspiration. There are so many awesome plants to grow, and I think Daphne odora is one that will bring you great joy, even if it is short lived.
7fc3f7cf58