Re: Two forms in one template.

2017-11-15 Thread Ege Güneş
You need to render your template with two forms in context. For example: class LoginFormView(views.View): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["login_form"] = LoginForm() context["registration_form"] = RegistrationFo

Re: Are time zone definitions actually required/used in MySQL?

2017-11-15 Thread bill.torcaso
I frequently use Django + MySql on a pristine Vagrant virtual machine. And on a fresh machine, for the first time, I had to manually load time zone information into mysql. 'runserver' refused to run, although 'python ./manage.py --help' ran fine (that is not a surprise - --help does not tou

reg:not able to open registration form web page

2017-11-15 Thread 'Amitesh Sahay' via Django users
Hello Members,  I am new to Django, and trying to create a mock Django registration page. I am using default Django "User" model to do that, and I am not customizing anything. Its a very simple form with 3 fields as follows: 'username','password','email'. Below are my python and html code details

Re: [1.11] deviation between .create() and .update()

2017-11-15 Thread Henrik Baran
This actual works, however I am still curious about the deviation between create and update. -- 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+unsubsc

Re: How to authenticate a user in websocket connection in django channels when using token authentication

2017-11-15 Thread Dominik Szmaj
Hey, I've done this websocket authorization almost exactly like Robin, and it's working (like receiving token with query params, verifying it and things) but it's not properly opening connection (like its not sending accept: True, which I do after verification) and connection is permanently in

Re: Are time zone definitions actually required/used in MySQL?

2017-11-15 Thread Mike Dewhirst
On 16/11/2017 2:53 AM, bill.torcaso wrote: I frequently use Django + MySql on a pristine Vagrant virtual machine.  And on a fresh machine, for the first time, I had to manually load time zone information into mysql. 'runserver' refused to run, although 'python ./manage.py --help' ran fine (

Re: Two forms in one template.

2017-11-15 Thread Mike Ru
Thank you so much! среда, 15 ноября 2017 г., 6:29:57 UTC+3 пользователь Mike Ru написал: > > How can I pass two forms(registration and login) in one template? I'm > using 'registration' and it's using different templates. For registration > it's using 'registration_form.html and for login it's u

Django 2.0 release candidate 1 released

2017-11-15 Thread Tim Graham
We've made the final (hopefully) release on the way to Django's next major release, Django 2.0! Check out the blog post: https://www.djangoproject.com/weblog/2017/nov/15/django-20-release-candidate-1-released/ -- You received this message because you are subscribed to the Google Groups "Django

Django debug of templates and home.html

2017-11-15 Thread drone4four
I am having fun trying to initiate a django project with some apps. I am taking an awesome course on udemy called, The Ultimate Beginner's Guide to Django. I was able to follow along and I have a basic blog up and running. Now I am back tracking a little by starting over, this time using a supp

Django field model for HTML parser?

2017-11-15 Thread drone4four
The contents of my models.py looks like this: from django.db import models # Create your models here. class Post(models.Model): title = models.CharField(max_length=256) pub_date = models.DateTimeField() image = models.ImageField(upload_to='media/') body = models.T

Re: Form on each page problem when upgrading from Django 1.4

2017-11-15 Thread yakkadesign
@Matthew, It's not a login form. It's a normal form. I don't like the AJAX way. It adds moving parts and requires a front end rework (and more tests, browser compatibility tests, potential issues with plugins blocking, etc.). On Sunday, November 12, 2017 at 12:56:53 PM UTC-5, yakka...@gm

Re: Form on each page problem when upgrading from Django 1.4

2017-11-15 Thread yakkadesign
Anyone else have ideas using the Django backend? On Sunday, November 12, 2017 at 12:56:53 PM UTC-5, yakka...@gmail.com wrote: > > I'm in the process of upgrading a website from Django 1.4 and I'm run into > a problem of getting my code that shows a form on almost every page > migrated. I eventu

Re: Disable Auth on Django Application.

2017-11-15 Thread Arun S
Hi, Is there any other way out using the default django AUTH itself. When you say, custom authentication backend, you mean the models are completely different and do not use the django Auth mechanism or it just updates the customer DB? --- Arun. On Tuesday, November 14, 2017 at 11:27:26 AM U

Re: Django debug of templates and home.html

2017-11-15 Thread 'Amitesh Sahay' via Django users
Hello,  In the settings.py please give the full path to your appsclass as mentioned in app.py. That should be the standard.  Please share the HTML code here, then it should be clear for further suggestion. Regards,Amitesh Sahay primary :: 91-907 529 6235 On Thursday 16 November 2017, 6:4

Re: Django field model for HTML parser?

2017-11-15 Thread 'Amitesh Sahay' via Django users
The HTML file in Django is parsed through views.py if that is what you are looking for. For Italics tag should work. For strong text, you may use tag. I hope that I have understood your question correctly. Hello, Regards,Amitesh Sahay primary :: 91-907 529 6235 On Thursday 16 Novembe

Re: Disable Auth on Django Application.

2017-11-15 Thread 'Amitesh Sahay' via Django users
Hello Arun,  In that case, you may just need to import "User" model in model.py as below from django.db import modelsfrom django.contrib.auth.models import User class Registration(models.Model):    user = models.OneToOneField(User, on_delete=models.CASCADE) That's it, and then you need to mention

Manager isn't available; 'auth.User' has been swapped for 'common.User'

2017-11-15 Thread Mike Dewhirst
Any hints appreciated. I'm stumped. Traceback at the end. Many thanks Mike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I have a custom user based on AbstractUser plus a UserProfile model as follows: #common.models from dj

Re: Django debug of templates and home.html

2017-11-15 Thread drone4four
Hello Amitesh. Thank you for your reply. The contents of my apps.py reads: # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class BlogitemsConfig(AppConfig): name = 'blogitems' There is no instance of 'BlogitemsConfig' or 'AppConfig' inside

Re: Django debug of templates and home.html

2017-11-15 Thread drone4four
Amitesh, here are the contents of my home.html: > > > J. R. Dobb's Blog! > > > > > href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"; > > integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" > >

Repaired django [Was: Manager isn't available; 'auth.User' has been swapped for 'common.User']

2017-11-15 Thread Mike Dewhirst
The fix is to adjust 1.11 django.contrib.auth.forms as follows: Line 12 - comment it right out Line 88 - change User to UserModel Line 128 - change User to UserModel Here is the diff ... @@ -9,7 +9,7 @@ from django.contrib.auth import (  from django.contrib.auth.hashers import ( UNUSABLE_P

Not Repaired django [Was: Repaired - Manager isn't available; 'auth.User' has been swapped for 'common.User']

2017-11-15 Thread Mike Dewhirst
Seems to have pushed the error a bit further down the line. Still in trouble. Mike On 16/11/2017 5:31 PM, Mike Dewhirst wrote: The fix is to adjust 1.11 django.contrib.auth.forms as follows: Line 12 - comment it right out Line 88 - change User to UserModel Line 128 - change User to UserModel

Re: Not Repaired django [Was: Repaired - Manager isn't available; 'auth.User' has been swapped for 'common.User']

2017-11-15 Thread Mike Dewhirst
Fixed it again. It works for me but no guarantees. Reverted previous changes and ... Insert line 23 - User = get_user_model() This needs someone above my pay grade. Cheers Mike On 16/11/2017 5:37 PM, Mike Dewhirst wrote: Seems to have pushed the error a bit further down the line. Still in tr

Re: Manager isn't available; 'auth.User' has been swapped for 'common.User'

2017-11-15 Thread James Schneider
On Nov 15, 2017 8:18 PM, "Mike Dewhirst" wrote: Any hints appreciated. I'm stumped. Traceback at the end. Many thanks Mike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I have a custom user based on AbstractUser plus a UserProf