Re: How to send user specific data on Group().send() on Channels?

2017-01-02 Thread Utku Gültopu
Then since I will be sending different data for every user, holding online users in a single Group does not make sense right? But then where should I hold online users? In a database table? The documentation states using a Group is the best option because it automatically handles removing the

Re: multiple databases - two questions

2017-01-02 Thread Mike Dewhirst
On 3/01/2017 12:32 PM, Fred Stluka wrote: Mike, Maybe you don't need a custom DB manager. Perhaps a simple DB router would suffice? It's a Django way to specify which DB to use based on which model is being used, whether it is being read/written, etc. That's the approach I took. The essence

Re: multiple databases - two questions

2017-01-02 Thread Fred Stluka
Mike, Maybe you don't need a custom DB manager.  Perhaps a simple DB router would suffice?  It's a Django way to specify which DB to use based on which model is being used, whether it is being read/written, etc. See: -

Re: Admin - saveasnew to another database

2017-01-02 Thread Mike Dewhirst
Fred Spot on!Saving to the production database didn't work. It couldn't get past the atomicity protection in Postgres. I gave up and did it manually for the fellow who had got himself into that pickle. He loves me now. It's embarrassing! We also adjusted the user docs to say the staging

Re: localStorage to save answer to form until it is sent to server

2017-01-02 Thread Fred Stluka
Raniere, Another possibility is to do the temporary storage on the server instead of the client.  Use _javascript_ to make an occasional Ajax call to the server to store the current data in the session.  Don't necessarily have to store it in the DB.  Make the

Re: Admin - saveasnew to another database

2017-01-02 Thread Fred Stluka
Mike, On 11/11/16 8:00 AM, Mike Dewhirst wrote: > ... My solution is to tell the users to avoid doing real work on the > staging server.  It exists only to check out new features. ... I have a similar issue with users of my TEST vs PROD web sites. 

Re: How to send user specific data on Group().send() on Channels?

2017-01-02 Thread Andrew Godwin
> However, Group('online-users').send({'data': 'data'}) does not send the data to websocket.send channel. It sends the data directly over the WebSocket. It does, in fact, do exactly this - it seems you have got confused when you mention a consumer for the websocket.send channel, though, which is

Re: Deploying a Django App on GitHub Pages with the aid of Firebase

2017-01-02 Thread Vijay Khemlani
Github pages is only for static files, so no, unless your application only consists of static html files (in which case you woudn't be using django) On 1/2/17, Mostafa Elgayar wrote: > Is it possible to deploy a Django Application on GitHub pages, by having > the backend on

Deploying a Django App on GitHub Pages with the aid of Firebase

2017-01-02 Thread Mostafa Elgayar
Is it possible to deploy a Django Application on GitHub pages, by having the backend on Firebase for example and retrieving data using Angular.js which would be deployed on GitHub as something static? If anyone could help me with some steps, I'd be so grateful. -- You received this message

Re: Advise for first project in Django

2017-01-02 Thread Brian Witte
Welcome to Django! Getting a web site to work can be very hard. Even if you know django, there are many other services you need, too: a database, testing, a webserver, etc. This tutorial is one of the best I have seen: http://www.marinamele.com/taskbuster-django-tutorial On Friday, December

How to send user specific data on Group().send() on Channels?

2017-01-02 Thread Utku Gültopu
In my application, I need run a piece of code (let's call it prepare_and_send_data(user)) for every online user, every N minutes. That piece of code will do a calculation using the data that belongs to the user, and send the results over a WebSocket connection. Initially, I thought that

Re: Serving external files with Django

2017-01-02 Thread Brian Witte
Hi Priyesh, Do you know what volume of files you expect to serve? The answer to this question will be different depending on where the files are hosted. If you expect a low volume of downloads, it might be easiest to just host the files on dropbox or even served from your own db. If you

Re: Serving external files with Django

2017-01-02 Thread Constantine Covtushenko
Hi Priyesh, You can start from managing files documentation of Django. Hope that helps On Mon, Jan 2, 2017 at 6:16 PM, Priyesh Raj wrote: > Hi, > > I need to serve content of external files on user action (Click on

Serving external files with Django

2017-01-02 Thread Priyesh Raj
Hi, I need to serve content of external files on user action (Click on URL). The files are PDF and are not part of media or static files. How can I serve them in Django? Is there any built in way to handle it? Thanks -- You received this message because you are subscribed to the Google Groups

Re: Showing user's data on page

2017-01-02 Thread Branko Zivanovic
Thank you very much Sir, that worked! Happy New Year, all the best! Branko понедељак, 02. јануар 2017. 13.16.20 UTC+1, Daniel Roseman је написао/ла: > > This isn't a custom user model, it's a related model - what would normally > be called a user profile. > > Regardless, there *is* a reference

Re: understanding auth models

2017-01-02 Thread pradam programmer
Hi, Read the django doc about auth user they have specified thoroughly On 2 Jan 2017 7:48 pm, "Rasika" wrote: Hi, whenever I created the account for user using built in admin it get stored into auth_user tablein the database.Where I can find the code for this

understanding auth models

2017-01-02 Thread Rasika
Hi, whenever I created the account for user using built in admin it get stored into auth_user tablein the database.Where I can find the code for this where the connections between the auth_user and save() so that I can understand it to write my own table connections. thank you -- You

Showing user's data on page

2017-01-02 Thread Daniel Roseman
This isn't a custom user model, it's a related model - what would normally be called a user profile. Regardless, there *is* a reference from User to CustomUser, via the one-to-one relation: you can just do `user.customuser`. -- DR. -- You received this message because you are subscribed to

Showing user's data on page

2017-01-02 Thread Branko Zivanovic
I've created custom user model which has OneToOneField which relates to original auth User model. In my template, I have to access data from custom model, but I use user.is_authenticated() and original model doesn't have reference to custom model. I'm not sure if I'm checking login incorrectly