Re: Django authorisation within PostgreSQL

2016-11-23 Thread Danny Remmerswaal
I indeed want to authenticate against my PostgreSQL users instead of the "default" table-based login, so I don't have to re-write my user-bound procedures and triggers. But I also want the admin interface implemented in my web application. Ideally, the "user" and "password" in my database conne

Re: New-style middleware

2016-11-23 Thread Torsten Bronger
Hallöchen! Carl Meyer writes: > [...] > > Yes, I agree with you that for middleware which don't implement > request or response processing (only process_exception, > process_view, or process_template_response), the new style is less > concise, because it requires implementing a boilerplate __init

Re: Django authorisation within PostgreSQL

2016-11-23 Thread Antonis Christofides
Ah, OK, so you want: (1) To authenticate as a PostgreSQL user; (2) To connect to the database as that user. As I said, (1) is probably possible with Apache+mod_auth_pgsql plus RemoteUserBackend. For (2), you need to create a custom database backend. Antonis Christofides http://djangodeployment.co

Help!! After a while Django no longer send information to client

2016-11-23 Thread 谭力彬
Here is My Django code @channel_session def ws_connect(message): # Extract the room from the message. This expects message.path to be of the # form /chat/{label}/, and finds a Room if the message path is applicable, # and if the Room exists. Otherwise, bails (meaning this is a some

'CSRF Verification Failed' in Django Translation

2016-11-23 Thread Veni Kunche
Hi everyone, I've set up translation for a Django app using this tutorial . I am using Python 3.4.5 and Django 1.9.10. I used set_language to switch between the languages. Everything was working great locally. However, I get a "CSRF Veri

Pre-populate formset with a user saved data on revisit

2016-11-23 Thread Said Akhmedbayev
I need to pre-populate a formset field with a user's saved data Here is my form.py EssayQuestionFormSetBase = modelformset_factory(models.EssayQuestion, extra=0, fields=('prompt',),

Re: [ANNOUNCE] Django security advisory: Vulnerability in password reset (master branch only)

2016-11-23 Thread William Hakizimana
While we are at it, could we implement these NIST new password guidelines into django? Just On Monday, November 21, 2016 at 3:13:21 PM UTC-6, Tim Graham wrote: > > We don't normally give security advis

Re: help for creating relationship between User model an another model !!

2016-11-23 Thread adonis simo
Thanks for looking This is the whole stack trace : Operations to perform: Apply all migrations: admin, auth, blog, contenttypes, polls, sessions Running migrations: Applying blog.0007_article_user...Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_lin

Re: help for creating relationship between User model an another model !!

2016-11-23 Thread pradam programming
Hi, Please refer this link. http://stackoverflow.com/questions/34473323/typeerror-int-argument-must-be-a-string-a-bytes-like-object-or-a-number-not On 23 Nov 2016 9:55 pm, "adonis simo" wrote: > Thanks for looking > This is the whole stack trace : > Operations to perform: > Apply all migration

Re: Channels: startup order of daphne and workers leads to issues

2016-11-23 Thread Andrew Godwin
Hi Alex, It sounds like this isn't a daphne/workers ordering bug (things just queue and run when available) but a serialisability issue - that is, you expected `websocket.connect` to run before `websocket.receive` but in the released version they will run in parallel if both have queued messages.