Enable https for a production django application

2017-12-04 Thread BIJAL MANIAR
Hello, We need to enforce an https connection for production django application running with apache and mod-wsgi. Can anyone please help me with what it will take to implement this. Thanks, Bijal -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Enable https for a production django application

2017-12-04 Thread Jani Tiainen
Hi, You just need to redirect (permanently) all traffic to port 80 to 443 in your Apache config. On 4.12.2017 10.03, BIJAL MANIAR wrote: Hello, We need to enforce an https connection for production django application running with apache and mod-wsgi. Can anyone please help me with what it

Re: Enable https for a production django application

2017-12-04 Thread BIJAL MANIAR
Hey Jani, Do we need to purchase SSL certificate? Any links on that would be helpful. Thanks, Bijal On Monday, December 4, 2017 at 1:36:35 PM UTC+5:30, Jani Tiainen wrote: > > Hi, > > You just need to redirect (permanently) all traffic to port 80 to 443 in > your Apache config. > > On 4.12.2017

Re: Enable https for a production django application

2017-12-04 Thread Jani Tiainen
Hi, You need SSL sertificate, sure. You can get one for free from Let's Encrypt [1] if your site is public. For private testing you can create self-signed certificates. [1] https://letsencrypt.org/ On 4.12.2017 11.15, BIJAL MANIAR wrote: Hey Jani, Do we need to purchase SSL certificate? Any

Password reset to Gmail addresses fails

2017-12-04 Thread Alastair Campbell
Hi everyone, I have a very strange problem, I'm looking for ideas on where to debug. Using the standard password reset in Django (v 1.10), it silently fails to send to Gmail addresses. There is no error generated by Django, and it works for non-Gmail addresses. In /var/log/mail.log (a Debian VM

Re: Enable https for a production django application

2017-12-04 Thread SHAILESH NEGI
Hey Bijal, You need to purchase the SSL. Follow the link. https://www.digitalocean.com/community/tutorials/how-to-install-an-ssl-certificate-from-a-commercial-certificate-authority On Mon, Dec 4, 2017 at 2:45 PM, BIJAL MANIAR wrote: > > Hey Jani, > Do we need to purchase SSL certificate? Any li

Re: Enable https for a production django application

2017-12-04 Thread Thiago Luiz Parolin
You can use Let's Encrypt - Free SSL/TLS Certificates ( https://letsencrypt.org) 2017-12-04 8:07 GMT-02:00 SHAILESH NEGI : > Hey Bijal, > > You need to purchase the SSL. > Follow the link. > https://www.digitalocean.com/community/tutorials/how-to- > install-an-ssl-cer

Unresolved filter 'crispy'

2017-12-04 Thread Kubilay Yazoğlu
I'm trying to add crispy forms to my project. (http://django-crispy-forms.readthedocs.io/en/latest/) I installed crispy forms by pip install django-crispy-forms I added this in installed apps: 'crispy_forms', And this at the end of settings.py: CRISPY_TEMPLATE_PACK = 'bootstrap3' A

Re: Django 2.0 released

2017-12-04 Thread Vijay Khemlani
I just wanted to take the chance to thank Tim and all the other people working on Django, especially on this big milestone for the project. At least for me It has served me well over the last 5 years, has incorporated many useful features while still being relatively lean, and has top notch docume

Re: Unresolved filter 'crispy'

2017-12-04 Thread Jason
That's coming from your IDE. Assuming its Pycharm, I've noticed it doesn't often pick up new additions to the virtualenv so I've made it a habit to invalidate caches and restart when making any additions. This is primarly for vagrant and remote interpreters. -- You received this message beca

Re: Enable https for a production django application

2017-12-04 Thread Jason
Let's Encrypt is great, especially with wildcard certificates coming next month. Downside is they're time-limited to 90 days of validity, so you'll have to come up with some automatic process to regenerate the certificate. Fortunately, the process is well documented and simple to execute. --

Why does this test fail?

2017-12-04 Thread Johann Spies
I am new to Testing Driven Development as well as to Django and will appreciate some help please. I have just worked through the tutorials of the official documentation for 1.11 and am trying to get going with TDD and Django. The app is wos_2017_2 and I get this in the shell (which is run in t

Re: Password reset to Gmail addresses fails

2017-12-04 Thread Julio Biason
Hi Alastair, Just one question: are you using Gmail SMTP to send those messages or are you using your own/a third party? Because Google could’ve marked your domain/server as spam and it is simply deleting all messages incoming from it (we had a similar problem a few days ago). If that’s the ca

Re: Password reset to Gmail addresses fails

2017-12-04 Thread Antonis Christofides
Hello, could you show your EMAIL_* settings? (Meanwhile https://djangodeployment.com/2017/01/18/why-does-django-not-email-me-the-500-internal-server-error/ might help.) Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-12-04 11:22, Alastair Campbell wrote: > Hi everyo

RenameField with django 2.0: AttributeError: 'ManyToManyRel' object has no attribute 'field_name'

2017-12-04 Thread edigiacomo
With Django==2.0, a RenameField on a model which has a reverse many to many relationship raises an exception: AttributeError: 'ManyToManyRel' object has no attribute 'field_name' The same migration with Django==1.11 terminates successfully. Migrations are automatically generated by `manage.

Re: Enable https for a production django application

2017-12-04 Thread Tim Chase
On 2017-12-04 01:15, BIJAL MANIAR wrote: > Do we need to purchase SSL certificate? Any links on that would be > helpful. There are two types of cert: DV ("Domain Validation" merely lets you know that you're securely talking with the domain you think you are) and EV ("Extended Validation" where the

Re: Why does this test fail?

2017-12-04 Thread Johann Spies
My question was answered on Stackoverflow: The correct line in the function should be response = client.get('/wos_2017_2/') *because of my project urls.py that I did not provide initially:* urlpatterns = [ url(r'^wos_2017_2/', include('wos_2017_2.urls')), url(r'^admin/', admin.site.urls), ]

Re: Password reset to Gmail addresses fails

2017-12-04 Thread Alastair Campbell
Thanks, The django settings are very straightforward (localhost, email address set), and I've just tried sending from Mutt on that server (command line email from localhost), with the same email address, and that appears in the logs and gets delivered. But from the password reset: nothing happens

Re: Password reset to Gmail addresses fails

2017-12-04 Thread Jason
what do you have for EMAIL_PORT and EMAIL_USE_TLS? IIRC, gmail requires TLS to be True. -- 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..

Re: Password reset to Gmail addresses fails

2017-12-04 Thread Vivek Shrivastava
Also, please check if "allow insure access" is turned on for GMail. On Mon, Dec 4, 2017 at 10:13 AM, Jason wrote: > what do you have for EMAIL_PORT and EMAIL_USE_TLS? IIRC, gmail requires > TLS to be True. > > -- > You received this message because you are subscribed to the Google Groups > "Dja

Re: Getting channels 2 to work

2017-12-04 Thread John Wayne
Hi Andrew, first of all thanks for your reply. With your answer and the information from your blog I was able to get my asgi application running. Now I want to route all http traffic to django's viewsystem back as i dont need channel's http handling. On your blog you posted this snippet appli

Re: Password reset to Gmail addresses fails

2017-12-04 Thread Alastair Campbell
Jason wrote: > what do you have for EMAIL_PORT and EMAIL_USE_TLS? IIRC, gmail requires > TLS to be True. > They are default (not set in the config). I believe the TLS is set by the mail agent, and the email I sent from Mutt on the command line used TLS so that appears to work. Vivek wrote: > Al

Re: RenameField with django 2.0: AttributeError: 'ManyToManyRel' object has no attribute 'field_name'

2017-12-04 Thread Simon Charette
Hello there, This looks like a regression in Django 2.0 caused by 095c1aaa[0]. Please file a new ticket mentioning it's a regression in Django 2.0 and mark it as a release blocker. [1] Thanks, Simon [0] https://github.com/django/django/commit/095c1aaa898bed40568009db836aa8434f1b983d [1] https:

Re: Getting channels 2 to work

2017-12-04 Thread Andrew Godwin
Hi John, The ProtocolTypeRouter currently does this for you automatically as long as you don't specify a `http` handler. Otherwise, the ASGI application that runs Django's view system is channels.http.AsgiHandler Andrew On Mon, Dec 4, 2017 at 7:56 AM, John Wayne wrote: > Hi Andrew, > > first o

Login

2017-12-04 Thread chaitanya.creator
Hi i am new users django .please help in making a login system using django Thank you -- 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...@g

Re: RenameField with django 2.0: AttributeError: 'ManyToManyRel' object has no attribute 'field_name'

2017-12-04 Thread edigiacomo
Thanks Simon, I've filed a new ticket https://code.djangoproject.com/ticket/28884 Emanuele On Monday, December 4, 2017 at 6:00:30 PM UTC+1, Simon Charette wrote: > > Hello there, > > This looks like a regression in Django 2.0 caused by 095c1aaa[0]. > > Please file a new ticket mentioning it's

Re: Login

2017-12-04 Thread Martin Peveri
Check this: https://simpleisbetterthancomplex.com/tutorial/2016/06/27/how-to-use-djangos-built-in-login-system.html El lunes, 4 de diciembre de 2017, 14:49:32 (UTC-3), chaitanya.creator escribió: > > Hi > i am new users django .please help in making a login system using django > Thank you >

Constraints across foreign keys

2017-12-04 Thread Rich Rauenzahn
Let's say I have: class Restaurant(Model): pass class Table(Model) restaurant = ForeignKey(Restaurant) class Chair(Model) restaurant = ForeignKey(Restaurant) table = ForeignKey(Table) Is there a best practice for ensuring that the chair assigned to a table is always from the same

Re: Need Help with Field Validation

2017-12-04 Thread Mark Phillips
I found my error after some more reading...The corrected clean_storage_file_name(self) def clean_storage_file_name(self): current_data = self.instance computed_sha256 = compute_sha256(self.cleaned_data.get("storage_file_name")) duplicates = Document.objects.filter(compu

Re: Login

2017-12-04 Thread Che Sampat
hey and there is a really good youtube series made by a guy called max i will leave a link to his FREE course and guides you to build exactly what your asking for i HIGHLY suggest doing it https://www.youtube.com/watch?v=Fc2O3_2kax8&list=PLw02n0FEB3E3VSHjyYMcFadtQORvl1Ssj On Monday, December 4,

How to make a subscription form for use with Stripe / dj-stripe?

2017-12-04 Thread Daniel Grace
I have set up a Stripe account and installed dj-stripe, but I can't find information on how to set up a subscription form. I understand that dj-stripe looks for a template in the djstripe directory, but I don't know what should be in the template. -- You received this message because you are

django-channels - building JS websocket wrapper

2017-12-04 Thread Filbert
Probably just my lack of client-side/JavaScript knowledge, but when I build the library: git clone https://github.com/django/channels.git cd channels/js_client npm install browserify npm install Probably just my lack of client-side/JavaScript knowledge, but when I build the library

Re: django-channels - building JS websocket wrapper

2017-12-04 Thread Filbert
Duh, "npm run compile" Sorry. On Monday, December 4, 2017 at 6:47:25 PM UTC-5, Filbert wrote: > > Probably just my lack of client-side/JavaScript knowledge, but when I > build the library: > > git clone https://github.com/django/channels.git > > cd channels/js_client > > npm install browser

How to save foreign key along with parent object in django 1.10

2017-12-04 Thread Priyanka Thakur
Hi, I want to create a bunch of objects that are interconnected in my model (eg, one Book and one Author object) and then call save() on the Book object to add everything to the database. In other words, I don't want to save Author object explicitly. Example: class Author(models.Model):

Re: How to save foreign key along with parent object in django 1.10

2017-12-04 Thread Constantine Covtushenko
Hi, Can you please describe why you did not want to call author.save() explicitly? What is wrong with this approach? Regards, Constantine C. On Mon, Dec 4, 2017 at 7:36 PM, Priyanka Thakur wrote: > Hi, > > > I want to create a bunch of objects that are interconnected in my model > (eg, one Bo

Off-topic - venv problem in Windows 8.1

2017-12-04 Thread Mike Dewhirst
I did a pip freeze in a virtualenv and saw packages I should not have seen. So I checked sys.path as follows ... C:\Users\mike\envs\xxct3\train>..\Scripts\activate (xxct3) C:\Users\mike\envs\xxct3\train>python Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on