Forbidden fix

2016-10-13 Thread Mike Dewhirst
I have two similar servers behaving differently. This is the staging server ... You don't have permission to access /substance/wsds/7291/ on this server. The production server is fine running Ubuntu 14.04 and Apache 2.2. The difference is that I have just upgraded staging to Ubuntu 16.04 and

How to add\get data in admin via reversed relation using GenericTabularInline?

2016-10-13 Thread Anton Ponomarenko
Hi all. I can add Criterias to a place. How can I add Places to a criteria? Models: class Criterias(models.Model): name = ... class Places(models.Model): name = ... class PlacesToCriterias(models.Model): content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) ob

Django + WSGI authentication

2016-10-13 Thread Garry
Hi. I'm porting a legacy Django+mod_python application to Django+WSGI on Apache httpd 2.4 (Linux) and cannot get user authentication to work. It's not that authentication is running and failing or that it's reporting errors, it's simply not running at all. When my WSGI-authenticated URL is acc

Re: How to add\get data in admin via reversed relation using GenericTabularInline?

2016-10-13 Thread Anton Ponomarenko
It was quite easy. GenericTabularInline must be changed to admin.TabularInline class CriteriaPlacesInlineAdmin(admin.TabularInline): model = PlacesToCriterias class CriteriasAdmin(admin.ModelAdmin): inlines = [CriteriaPlacesInlineAdmin] admin.site.register(Criterias, CriteriasAdmin) -

django 1.10.2 mysql 5.6.34 which connector?

2016-10-13 Thread Andres Marin
Dear all, I'm trying to learn about django, follow the documentation, in my first: python manage.py migrate all time get this error: File "/usr/local/lib/python3.5/site-packages/mysql/connector/django/operations.py", line 223, in bulk_insert_sql return "VALUES " + ", ".join([items_sql]

Re: django 1.10.2 mysql 5.6.34 which connector?

2016-10-13 Thread Tim Graham
Try mysqlclient as mentioned in https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers. As it says there, MySQL Connector/Python is developed by Oracle and may not support the most recent Django releases. On Thursday, October 13, 2016 at 6:47:02 PM UTC-4, Andres Marin wrot

Django and Lynda.com

2016-10-13 Thread Paul Handley
I am taking the Django and Python course on Lynda.com I have been following along, as the presenter shows me how to do it. I have downloaded and installed Python and Django; created my first project and first app. When I the presenter showed how to make a first "migration" by typing "python man

Re: Forbidden fix

2016-10-13 Thread Ricardo Prado
Can You send an image or log about this problem? Check virtualhost, APACHE 2.2 - use in dir "Allow All" APACHE 2.4 - use "Require All Grant" Em quinta-feira, 13 de outubro de 2016 04:47:58 UTC-3, Mike Dewhirst escreveu: > > I have two similar servers behaving differently. This is the staging

Slow first request django

2016-10-13 Thread Ricardo Prado
Hi Guys Someone can explain me the right way do create a virtualhost with threads and proccess? my first request is very slow between 5 to 10 seconds. I'm using ubuntu 14.04 with apache 2.4 Thanks ServerName 127.0.0.2 ServerAlias ahora.local WSGIDaemonProcess framework processes=5 threads=1

Re: django 1.10.2 mysql 5.6.34 which connector?

2016-10-13 Thread Ricardo Prado
First you can install python tools and other librarys If you using Ubuntu or Debian, check this steps sudo apt-get install python-setuptools apache2 libapache2-mod-wsgi sudo apt-get install python-pip sudo apt-get install *python-dev libmysqlclient-dev* Don't use 'ENGINE': 'mysql.connector.dj

Selenium Functional Tests against Heroku-hosted Django Site

2016-10-13 Thread A Wall
Hello, I'm looking to run functional tests using Django 1.10.2 and Selenium 3.0.0 against a staging Django site hosted on Heroku. To be clear, I want to do something like entering the command $ python manage.py test my_functional tests --liveserver=[ip address of remote server here], as is rec

Re: django 1.10.2 mysql 5.6.34 which connector?

2016-10-13 Thread Andres Marin
Hi, Thanks... The steps to solve my issue: install mysqlclient: pip install mysqlclient thanks Tim Graham Configure in settings: 'ENGINE': 'django.db.backends.mysql', Thanks Ricardo Prado Now, all is working fine! Regards! AYMG On Thursday, October 13, 2016 at 8:37:52 PM UTC-5, Ricardo Pra

Re: Slow first request django

2016-10-13 Thread Avraham Serour
I will take a wild guess here and say that this is a modwsgi problem, it seems it will only load the django app after the first request. Honestly I suggest you to use nginx with uwsgi, the killer feature is that it is not apache, I ran with so many bumps with apache that I turned to nginx and neve

Re: Django + WSGI authentication

2016-10-13 Thread Avraham Serour
maybe the user is already logged in? it is sending the sessionid and the server is authenticating checking the sessionid On Thu, Oct 13, 2016 at 10:09 PM, Garry wrote: > Hi. > > I'm porting a legacy Django+mod_python application to Django+WSGI on > Apache httpd 2.4 (Linux) and cannot get user au

Re: Django and Lynda.com

2016-10-13 Thread Gergely Polonkai
Hello, assuming you created the models.py file and filled it with model classes, the only thing I can think of is you haven't added your own app to the INSTALLED_APPS variable in settings.py Hope that helps. Best, Gergely On Fri, Oct 14, 2016, 03:37 Paul Handley wrote: > I am taking the Djang

Re: Django and Lynda.com

2016-10-13 Thread Vineet Kothari
On Oct 14, 2016 10:38 AM, "Gergely Polonkai" wrote: > Hello, > > assuming you created the models.py file and filled it with model classes, > the only thing I can think of is you haven't added your own app to the > INSTALLED_APPS variable in settings.py > > Hope that helps. > > Best, > Gergely > >