Re: Redirect from auth backend

2017-05-07 Thread Ryan Nowakowski
Usually the login_required decorator does this kind of thing for me. On May 5, 2017 6:53:21 AM CDT, roboslone - wrote: >Hello, > >I have an authentication backend, that authenticates users against a >remote service using session cookie. >Mentioned cookie can expire and

Re: Admin css question for 1.10.7

2017-05-07 Thread Mike Dewhirst
Tim The problem does not exist in 1.8.18 and does exist in 1.9 Here is the test I wrote to see if the css file contains the problem (which I established by trial and error) ... # -*- coding: utf-8 -*- import os from django.test import TestCase from django.contrib import admin expected =

Re: Unit testing Multiselect fields not loading as expected

2017-05-07 Thread Trevor Woolley
Further investigation shows this as failing outside of a test scenario, and the "my_choices" is not being updated, unless the server (be that the ./manage.py runserver" or a production apache server) is restarted. Rgds Trevor On Friday, May 5, 2017 at 3:20:04 PM UTC+10, Trevor Woolley wrote: >

Update FileField: what is the name of the old file

2017-05-07 Thread Nonverbis M
*Django 1.11* When FileUpdate is called, I substitute the old file with a new one. I'd like to handle the old file. Namely move it to some other directory. Could you have a look at the picture below. New file is called "C book 1.pdf". Existing file is called

Re: get method inside class based view

2017-05-07 Thread Vijay Khemlani
Assuming this view is for a path like http://example.com/shortener If you make a GET request to it (as in navigating to it in a browser) it displays the form calling the "get" method in the view. When you submit the form it usually does so to the same URL but with the POST method. So in this

Re: Define port for LiveServerTestCase in 1.11?

2017-05-07 Thread Simon McConnell
Thanks. I got it working by adding from django.test.testcases import LiveServerThread class FixedPortServerThread(LiveServerThread): def _create_server(self, port): return super(FixedPortServerThread, self)._create_server(port=8001) class MyStaticLiveServerTestCase(StaticLiveServerTestCase):

Re: get method inside class based view

2017-05-07 Thread Daniel Roseman
On Sunday, 7 May 2017 17:21:10 UTC+1, Ismail Sarenkapic wrote: > > The question is, what is the purpose of get method here,when we have post > method > is it useless in this case?If not what is function of get method? > > Why would it be useless? The get method is for GET requests, the post

get method inside class based view

2017-05-07 Thread Ismail Sarenkapic
forms.py from django import forms from .validators import validate_url, validate_dot_com class SubmitUrlForm(forms.Form): url = forms.CharField( label='', validators=[validate_url], widget = forms.TextInput( attrs ={

Re: OperationalError:no such table

2017-05-07 Thread Felipe Brunelli de Andrade
Just check if the table exists in database! 2017-05-07 7:54 GMT-03:00 hamza bouissi : > after I add new model and delete all other models and their migration > files I ran makemigrations followed by migrate command, Unfortunately, I > got OperationalError: no such table

OperationalError:no such table

2017-05-07 Thread hamza bouissi
after I add new model and delete all other models and their migration files I ran makemigrations followed by migrate command, Unfortunately, I got OperationalError: no such table

Re: Admin css question for 1.10.7

2017-05-07 Thread Mike Dewhirst
On 7/05/2017 8:12 PM, Tim Graham wrote: You can use git bisect to find the Django commit where the behavior changed: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression Just read this and I have two problems ... 1. It is a css problem

Re: Define port for LiveServerTestCase in 1.11?

2017-05-07 Thread Tim Graham
No. This is discussed in more detail on django-developers: https://groups.google.com/d/topic/django-developers/J2nPccK9kT8/discussion On Sunday, May 7, 2017 at 12:18:06 AM UTC-4, Simon McConnell wrote: > > Hi, > > > > Is it possible to define the port for LiveServerTestCase in Django 1.11? >

Re: Admin css question for 1.10.7

2017-05-07 Thread Tim Graham
You can use git bisect to find the Django commit where the behavior changed: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression On Saturday, May 6, 2017 at 11:05:14 PM UTC-4, Mike Dewhirst wrote: > > I'm just (slowly) advancing from 1.8 to 1.11