Re: Multiple Database Setup problem !?

2018-11-02 Thread 'Tom Evans' via Django users
Hi David Your router isn't configured correctly. This applies to all the allow_foo() methods, but see allow_migrate [1] as an example: Determine if the migration operation is allowed to run on the database with alias db. Return True if the operation should run, False if it shouldn’t run, or

Re: Where to create a Django project

2018-11-02 Thread bill . torcaso . oxfam
Hope this helps When working on an AWS Elastic Beanstalk instance, you can log into the system using Secure Shell (SSH), with a key pair. For EBeanstalk, that key pair was either created or selected from existing keys at the time that you created the server. >From there you have a

Where to create a Django project

2018-11-02 Thread KH
I am new to Django and web development and am having some issues figuring out how to get started. I am following the Django getting started tutorial on their website. Where is a Django project supposed to be created? I installed Django into an AWS ec2 instance and was able to run the default

Re: Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Joel Mathew
No I hadnt. I did so now, and got a few errors: joel@hp:~/myappointments$ python3 manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /home/joel/myappointments/appointments/static This will overwrite existing files!

RE: Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Matthew Pava
Did you run collectstatic? -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Joel Mathew Sent: Friday, November 2, 2018 2:19 PM To: django-users@googlegroups.com Subject: Turning DEBUG=True causes a tornado of Error 500s When I

Re: Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Joel Mathew
Please forgive the typo in the subject line. It should read "Turning DEBUG=False causes a tornado of Error 500s" Joel G Mathew On Sat, 3 Nov 2018 at 00:49, Joel Mathew wrote: > > When I turned DEBUG = False in my project/settings.py, I suddenly got > a whole bunch of HTTP Error 500. Most of

Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Joel Mathew
When I turned DEBUG = False in my project/settings.py, I suddenly got a whole bunch of HTTP Error 500. Most of the css reources showed the error. I have two apps in this project, and I've been sharing static resources between these apps. Would these be the cause of these errors? See the following

Re: Running a custom code after the server is up

2018-11-02 Thread bill . torcaso . oxfam
If I understand your situation, you want to run a management command fairly promptly after Django-server reboot, and not again for the duration of the server's uptime. Cron is useful and convenient for repeated tasks. And it can be made to handle once-and-done tasks, if you keep a bit of

Re: Using django on kubernetes

2018-11-02 Thread PASCUAL Eric
My opinion is that Minikube is the easiest way, since it is quite simple to set up and run. Behind the curtains it uses a VirtualBox machine BTW if I'm not mistaken (at least under Linux). You can of course set up a multi-node stack using several VMs (after all, this is exactly what hosters

Re: Running a custom code after the server is up

2018-11-02 Thread PASCUAL Eric
Hi, IMHO the simplest way is to use cron. Since you are working with Docker, one option is to add a container to your stack, sharing the same image as your Django app so that it can run the management command implementing your periodic process. Configure this container so that the command

Re: I Suck

2018-11-02 Thread William Vincent
Try this out if you're a beginner: https://djangoforbeginners.com/. Not every teacher works for every student. The key thing is this stuff is hard but it's not rocket science. Step by step. And as you've done here, don't be afraid to reach out for help. Django is a great community in that

Re: Where to start - New to Django and Python

2018-11-02 Thread William Vincent
Well I'm biased but add Django for Beginners to the mix too. Also Django Girls is a great first step. On Monday, October 22, 2018 at 8:02:01 AM UTC-4, Lokendar Singh wrote: > > Hi Community, > > I'm new to django and

Re: Django bugfix release: 2.1.3

2018-11-02 Thread William Vincent
Well done Carlton et al! On Thursday, November 1, 2018 at 10:44:39 AM UTC-4, Carlton Gibson wrote: > > Details are available on the Django project weblog: > > https://www.djangoproject.com/weblog/2018/nov/01/bugfix-release/ > > -- You received this message because you are subscribed to the

Re: Use Email to Login With Django Auth

2018-11-02 Thread William Vincent
Here you go: https://wsvincent.com/django-login-with-email-not-username/. On Thursday, November 1, 2018 at 8:09:13 AM UTC-4, Ryan Shepard wrote: > > How could i go about allowing people to also use their email to sign into > Django instead of a username? I have done research my self and tried >

Re: Left outer join rather than subquery.

2018-11-02 Thread Dan Davis
I'm going to answer myself in case anyone else looks for an answer to this. In Django<2.x, the Subquery method I'm using is the best available. In Django>=2, I can use the FilteredRelation with my annotation instead:

Re: foreign key is not working

2018-11-02 Thread Nelson Varela
Please do add some code so we can see what is going wrong On Friday, November 2, 2018 at 5:44:38 AM UTC+1, amit pant wrote: > > i used all method which is on docs but still it's not working properly. > i am using django 2 with pyhton 3 > > > On Wed, Oct 31, 2018 at 5:28 PM Paras Patidar >

Running a custom code after the server is up

2018-11-02 Thread Bartosz Gańcza
Hi everyone! I am somewhat of a Django beginner and I can't seem to find an easy solution to what I need to do anywhere. I have a web scraping code I wish to run in the background automatically (once) after the server is up and running. I use Docker to fire up the DB and the web server itself

Re: Use Email to Login With Django Auth

2018-11-02 Thread William Vincent
Yes that's me. I'm actually procrastinating on my book by writing up an example of login with email right now. Look for it shortly... Thanks for the kind words. On Friday, November 2, 2018 at 9:43:23 AM UTC-4, Anirudh Jain wrote: > > Hey William > > Is it you who runs the website wsvincent.com

Re: Use Email to Login With Django Auth

2018-11-02 Thread Anirudh Jain
Hey William Is it you who runs the website wsvincent.com ? Great stuff you have out there. Keep working man !! On Fri, 2 Nov 2018, 19:08 William Vincent As others have noted, the short answer is use django-allauth. Here's a > basic implementation that might help:

Re: Use Email to Login With Django Auth

2018-11-02 Thread William Vincent
As others have noted, the short answer is use django-allauth. Here's a basic implementation that might help: https://github.com/wsvincent/djangox. On Thursday, November 1, 2018 at 8:09:13 AM UTC-4, Ryan Shepard wrote: > > How could i go about allowing people to also use their email to sign into

Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread amit pant
yes, you can use javascript and for url we need to see what you want to do. Would be good if you provide screenshot. Thanks On Fri 2 Nov, 2018, 6:42 PM Manjunath, wrote: > you can easily use java script set_timeout method for redirection after > certain time. > > Elaborate your second

Re: django render html template isse

2018-11-02 Thread Code Binder
On Fri, Nov 2, 2018 at 12:10 sidh wrote: > Issue resolved. just needed to decode my output string : > decode('utf-8') > > On Friday, November 2, 2018 at 1:20:52 AM UTC+1, sidh wrote: >> >> Hi, >> >> I am executing script using django form and it provides me below results. >> It's good but i

Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread Manjunath
you can easily use java script set_timeout method for redirection after certain time. Elaborate your second question. Provide relevant screenshots if possible. On Fri, Nov 2, 2018 at 5:11 PM praveen bhuvi wrote: > Now my 1st problem is in views.py i have a function , now in that function >

Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread Manjunath
you can easily use java script set_timeout method for redirection after certain time. Elaborate your second question. Provide relevant screenshots if possible. On Friday, November 2, 2018 at 5:11:40 PM UTC+5:30, praveen bhuvi wrote: > > Now my 1st problem is in views.py i have a function , now

Re: difference between id and pk

2018-11-02 Thread Christian Ledermann
If you do not add a primarykey explicitly django will create a field `id` for you by default. Normally this is an autoincrement integer. see https://docs.djangoproject.com/en/2.1/topics/db/models/#automatic-primary-key-fields You may name your primary key field to whatever you want. `pk` is an

Re: django render html template isse

2018-11-02 Thread sidh
Issue resolved. just needed to decode my output string : decode('utf-8') On Friday, November 2, 2018 at 1:20:52 AM UTC+1, sidh wrote: > > Hi, > > I am executing script using django form and it provides me below results. > It's good but i would like to render it to html template. > > *return

Improve for check "save() prohibited to prevent data loss due to unsaved related object"

2018-11-02 Thread Roman
Hi, Can somebody explain me the reason why model save() method doesn't respect database settings? I have case with foreign key defined like this: class Measurements(models.Model):     customer = models.ForeignKey(Customer, on_delete=models.SET_NULL, *blank=True, null=True*)     order =

problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread praveen bhuvi
Now my 1st problem is in views.py i have a function , now in that function when certain condition is met i have to redirect to another page after 10 sec or 20 sec. my 2nd problem is i dont know how to set (or) match the pattern in [application]/urls.py -- You received this message because you

difference between id and pk

2018-11-02 Thread amit pant
I want to know, what is main difference between pk and id on django. Would appreciate if any one could help me. Thanks -- 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

Re: Use Email to Login With Django Auth

2018-11-02 Thread Anirudh Jain
Use django allauth library. It's great. On Thu, 1 Nov 2018, 17:39 Ryan Shepard How could i go about allowing people to also use their email to sign into > Django instead of a username? I have done research my self and tried > creating my own backend for it. But it doesn't work. > > -- > You

Re: Use Email to Login With Django Auth

2018-11-02 Thread Derek
And here's a helpful blog post walking you through the basics: https://simpleisbetterthancomplex.com/tutorial/2016/10/24/how-to-add-social-login-to-django.html On Thursday, 1 November 2018 23:54:56 UTC+2, Timothy Cook wrote: > > I use this and it works great. >

Re: Error when I use python manage.py makemigrations polls

2018-11-02 Thread Dewansh Rawat
Instead of polls.app.appconfig try writing polls -- 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 django-users+unsubscr...@googlegroups.com. To post to this

Re: foreign key is not working

2018-11-02 Thread ansh srivastav
Where is model codes? [image: Mailtrack] Sender notified by Mailtrack 11/02/18, 1:47:40 PM On Fri, Nov 2, 2018 at 10:14 AM

Re: Error : MultiValueDictKeyError

2018-11-02 Thread amit pant
Anytime... On Fri 2 Nov, 2018, 11:37 AM PRATEEK SHARMA, wrote: > Thanks a lot for your help, it works now > > On Fri, Nov 2, 2018, 10:01 AM amit pant >> hey, >> you can use request.POST.get('username') >> >> -- >> You received this message because you are subscribed to the Google Groups >>

Re: Error : MultiValueDictKeyError

2018-11-02 Thread PRATEEK SHARMA
Thanks a lot for your help, it works now On Fri, Nov 2, 2018, 10:01 AM amit pant hey, > you can use request.POST.get('username') > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails