Re: Can't log in to admin interface:

2017-03-15 Thread Melvyn Sopacua
On Wednesday 15 March 2017 14:27:55 C.J.S. Hayward wrote: > Django has claimed incorrect login details for every > administrative set of credentials I've offered. (I've also used > python manage.py shell to confirm that the username for the superuser > is what I thought it was: admin. Any chance

Re: 'OneToOneField' object has no attribute 'get' in function-based view

2017-03-15 Thread Vijay Khemlani
At least I can help with the original problem Your view function should return an HttpResponse object, but inside your view you have this new_title = title_form.save() return new_title new_title is an instance of your ObjectName model, that's why Django crashes when it tries to use it as an Http

Re: 'OneToOneField' object has no attribute 'get' in function-based view

2017-03-15 Thread Pedro Paulo Palazzo
Here is the traceback: Environment: Request Method: POSTRequest URL: http://127.0.0.1:8000/work/add/ Django Version: 1.10.6Python Version: 3.6.0Installed Applications:['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.mess

Re: Error running Django tutorial

2017-03-15 Thread Thomas Pittman
from django.conf.urls import url from django.conf.urls import include from django.conf.urls import polls\ from django.contrib import admin urlpatterns = [ url(r'^polls/', include('polls.urls')), url(r'^admin/', include('admin.site.urls')), ] Here is a copy of the the mysite.py file. I'm n

Re: Error running Django tutorial

2017-03-15 Thread Thomas Pittman
Here is the error I keep getting. I've started this tutorial on python 3.6. I ran into the problems people had before. Somehow I've fixed them before I got here. I can't seem to reconcile this part. Any suggestions? On Saturday, February 27, 2016 at 2:50:39 PM UTC-5, Mike Kipling wrote: > >

Re: 'OneToOneField' object has no attribute 'get' in function-based view

2017-03-15 Thread Vijay Khemlani
Can you post the whole stack trace of the error? There are some things that don't make sense in the view function (for example returning "new_title" from the view) but they are not related to your initial error. On 3/15/17, Pedro Paulo Palazzo wrote: > > > I am writing a two-part form where I wa

'OneToOneField' object has no attribute 'get' in function-based view

2017-03-15 Thread Pedro Paulo Palazzo
I am writing a two-part form where I want to pass the object saved in the first part as a OneToOneField for the object in the second part. In views.py: def object_entry(request): if request.method == 'POST': title_form = TitleEntry(request.POST) object_form = ObjectEntry(

Can't log in to admin interface:

2017-03-15 Thread C.J.S. Hayward
In Why is Django not filling out variable entries? , insight based on a comment helped me get past the main obstacle I was struggling with, of not being able to get to the admin login screen. However, afte

Meta class completely missing.

2017-03-15 Thread Brandon
print Foo.Meta throws AttributeError: type object 'Foo' has no attribute 'Meta' for *some* classes. Reproduce it by: from django.db import models class Foo(models.Model): value = models.CharField(max_length=256,blank=True) class Meta(object): pass Then makemigrations and migrat

Re: Migrations

2017-03-15 Thread Larry Martell
On Fri, Mar 10, 2017 at 3:17 PM, Matthew Pava wrote: > Does anyone else get a migraine when working migrations? I have 2 django systems I support. The first has 2 deployments, both in house, and one is generally a week or so behind the other. For this system migrations generally work fine, howeve

Re: Rename Table limiting the down of the system

2017-03-15 Thread Mike Dewhirst
On 15/03/2017 8:14 PM, Stefano Tranquillini wrote: Thanks, On Wed, Mar 15, 2017 at 9:43 AM, Mike Dewhirst > wrote: On 15/03/2017 7:12 PM, Stefano Tranquillini wrote: Hi people. I've to do a migration for the database, specifically I've to

Re: Migrating from django user model to a custom user model

2017-03-15 Thread Tim Graham
You can find an overview of how to migrate to a custom user model in https://code.djangoproject.com/ticket/25313. On Tuesday, March 14, 2017 at 11:42:34 PM UTC-4, Kakar Nyori wrote: > > I am following these two references (one > and two >

[Internationalization] Django not falling back to base language

2017-03-15 Thread Dibya Chakravorty
Hi everyone, I set the LANGUAGE_SESSION_KEY key in the current user's session to "en_US" (also tried with "en-us"), and my LANGUAGES settings is as follows: LANGUAGES = [ ('de', _('German')), ('en', _('English')), ] According to the docs

Re: No support for UNION (OUTER JOIN instead)

2017-03-15 Thread guettli
Just for the records, I added your work-around (until Django 1.11) to as comment on the issue tracker. Am Dienstag, 14. März 2017 10:37:07 UTC+1 schrieb guettli: > > Great, you and the django dev team are fast than light. Every time I spot > a basic missing part, you have already solved it in t

Re: Rename Table limiting the down of the system

2017-03-15 Thread Stefano Tranquillini
Thanks, On Wed, Mar 15, 2017 at 9:43 AM, Mike Dewhirst wrote: > On 15/03/2017 7:12 PM, Stefano Tranquillini wrote: > >> Hi people. >> >> I've to do a migration for the database, specifically I've to rename a >> table. >> >> To do so I've a RunPython that runs this sql statemnet >> `ALTER TABLE "o

Re: Rename Table limiting the down of the system

2017-03-15 Thread Mike Dewhirst
On 15/03/2017 7:12 PM, Stefano Tranquillini wrote: Hi people. I've to do a migration for the database, specifically I've to rename a table. To do so I've a RunPython that runs this sql statemnet `ALTER TABLE "old_table" RENAME TO "new_table"` First question: should I use https://docs.djangop

Rename Table limiting the down of the system

2017-03-15 Thread Stefano Tranquillini
Hi people. I've to do a migration for the database, specifically I've to rename a table. To do so I've a RunPython that runs this sql statemnet `ALTER TABLE "old_table" RENAME TO "new_table"` First question: should I use https://docs.djangoproject.com/en/1.8/ref/migration-operations/#renamemod