Re: Wants to make webpage auto reload whenever database is update.

2017-11-25 Thread shreekant bohra
Use this following code to reload page every few seconds as required - setTimeout(function () { location.reload(); }, 60 * 1000); -- Shree Kant Bohra Co-founder Geekybuddha Technologies On Sun, Nov 26, 2017 at 10:50 AM, Unnati C wrote: > Thanks for

Re: Wants to make webpage auto reload whenever database is update.

2017-11-25 Thread Unnati C
Thanks for suggestion Yingi Kem, But I am looking for any javascript or any other logical solution to refresh my web page automatically. Unnati On Saturday, November 25, 2017 at 10:32:51 PM UTC+5:30, yingi keme wrote: > > You can use channels. Check out channels in django. It is a websocket >

How do I limit my login form to just email and password?

2017-11-25 Thread Tom Tanner
My `models.py` has this: class MyUser(AbstractBaseUser): email= models.CharField(max_length=254, unique=True) USERNAME_FIELD= "email" My `forms.py` has this: class LoginForm(AuthenticationForm): email= forms.EmailField(label=_("Email"), max_length=254) class Meta: model= MyUser fields=

Re: Django Channels and multi-tenant will this be a world of hurt?

2017-11-25 Thread Filbert
Andrew, Thanks for the response. Seeing that I am keeping uWSGI for the non-websocket paths, any heartache with me starting daphne and the consumers using uWSGI's attach-daemon? I do this with celery and it is a convenient way to have everything for the App managed as a unit via a single

Re: How to define a url that does not belong to any app?

2017-11-25 Thread Jason
What you can do is populate a path in your DIRS list in TEMPLATES in your settings file to the directory where your template is located. Then, you can use TemplateView from django.views.generic to pass in a HTML file to be served up by Django for that URL. Something like this: urls.py from

Re: How to define a url that does not belong to any app?

2017-11-25 Thread Jason
Enter code here... What you can do is populate a path in your DIRS list in TEMPLATES in your settings file to the directory where your template is located. Then, you can use TemplateView from django.views.generic to pass in a HTML file to be served up by Django for that URL. Something like

Re: How to define a url that does not belong to any app?

2017-11-25 Thread Bernd Wechner
I'm curious too ;-). I suspect you can do pretty much anything at the project level that you can do at the app level but am not a pro in that space by any measure. This might be a useful read: https://stackoverflow.com/questions/4879036/django-projects-vs-apps Regards, Bernd. Kubilay

How to define a url that does not belong to any app?

2017-11-25 Thread Kubilay Yazoğlu
Hi there. I have only one week of experience in Django, some things aren't clear to me yet. I want to create a page where users can access by clicking on a button in homepage. Since this page contains plain text and there is no functionality in it, it does not have be in any of the apps. But

Re: How can I learn to make a user login?

2017-11-25 Thread Daniel Roseman
I literally just pointed you to the page in the docs that lists the login form and view. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: How can I learn to make a user login?

2017-11-25 Thread Tom Tanner
I see Django has an auth URLfor logging in. How do I construct the login form? I have a template that will have both login and register forms on it. My view `login_register` looks something like this: def login_register(request, template="pages/login_register.html"): ''' Display registration

[1.11] custom backend not working

2017-11-25 Thread Henrik Baran
Hi, for certain reasons I need to define custom user model and backend. First I only created a custom backend and kept with the standard user table Django provides. Authentication seems to work fine but the login is broken. By my view you can see that in case the user .is_authenticated a redirect

Re: How can I learn to make a user login?

2017-11-25 Thread Daniel Roseman
On Saturday, 25 November 2017 19:59:10 UTC, Tom Tanner wrote: > > To put it another way: Is there something like `UserCreationForm`, but for > logging in users? > > On Saturday, November 25, 2017 at 2:20:11 PM UTC-5, Tom Tanner wrote: >> >> I guess what I mean is... >> >> What’s function do I

Re: How can I learn to make a user login?

2017-11-25 Thread Tom Tanner
To put it another way: Is there something like `UserCreationForm`, but for logging in users? On Saturday, November 25, 2017 at 2:20:11 PM UTC-5, Tom Tanner wrote: > > I guess what I mean is... > > What’s function do I need to use that: > A) logs in the user > B) returns an error if there’s a

Re: How can I learn to make a user login?

2017-11-25 Thread Tom Tanner
I guess what I mean is... What’s function do I need to use that: A) logs in the user B) returns an error if there’s a problem logging in? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: How can I learn to make a user login?

2017-11-25 Thread Daniel Roseman
On Saturday, 25 November 2017 18:57:04 UTC, Tom Tanner wrote: > > I've read this tutorial > > > on making a simple user registration form. But what about a form for just > logging in existing

How can I learn to make a user login?

2017-11-25 Thread Tom Tanner
I've read this tutorial on making a simple user registration form. But what about a form for just logging in existing users? I can make a registration form with `views.py` looking like this:

Re: Wants to make webpage auto reload whenever database is update.

2017-11-25 Thread yingi keme
You can use channels. Check out channels in django. It is a websocket library and it will be useful for what you are looking for Yingi Kem > On 25 Nov 2017, at 4:55 PM, Unnati C wrote: > > Web page is about displaying data from database, Till now webpage is > displaying

Re: Building a web app for use of third party python package

2017-11-25 Thread Enikő Regényi
Thanks, I managed to put together something that uploads input, processes the data and downloads the results. I bumped into a problem though: I would like to redirect the user AND download the file. Is that possible somehow? (I apologize if this is a trivial question, I am new to django and

Wants to make webpage auto reload whenever database is update.

2017-11-25 Thread Unnati C
Web page is about *displaying data from database*, Till now webpage is displaying data, but if I want to see latest update* I have to refresh page in browser.* Is their any *solution to auto reload page *so user at end doesn't have to refresh it. -- You received this message because you are

Re: Django Channels and multi-tenant will this be a world of hurt?

2017-11-25 Thread Etienne Robillard
Hi, What is a multi-tenant site? how can i build a multi-tenant django app for django-hotsauce and asyncio without django-channels? Thank you, Etienne Le 2017-11-24 à 19:09, Andrew Godwin a écrit : Your assumptions all seem correct. Also consider that the security model of WebSockets