Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Sonali Vighne
thank Mohammad :) I will try it. hope so it would solve my issue. On Wednesday, August 29, 2018 at 10:32:32 AM UTC+5:30, Mohammad Aqib wrote: > > This password doesn't belong to mysql. This belongs to your database > 'hospital'. > > On Wed, Aug 29, 2018 at 10:07 AM Sonali Vighne > wrote: > >> I

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Mohammad Aqib
This password doesn't belong to mysql. This belongs to your database 'hospital'. On Wed, Aug 29, 2018 at 10:07 AM Sonali Vighne wrote: > I have not set password to My MySQL server during installation > > On Tuesday, August 28, 2018 at 5:42:30 PM UTC+5:30, Mohammad Aqib wrote: >> >> Set mysql

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Sonali Vighne
I have not set password to My MySQL server during installation On Tuesday, August 28, 2018 at 5:42:30 PM UTC+5:30, Mohammad Aqib wrote: > > Set mysql password. > > Without password how you can access mysql. > > See > > DATABASES = { > > *'default'*: { > > *'ENGINE'*:

Re: ManyToMany relationship with through_fields and Admin

2018-08-28 Thread akash kandpal
What changes you did ? Regards, Akash Kandpal. On Wed, Aug 29, 2018, 12:34 AM Vincent wrote: > I figured it out : > > from django.db import models > from django.contrib.auth.models import User > > > # Create your models here. > class Events(models.Model): > Name =

Re: ManyToMany relationship with through_fields and Admin

2018-08-28 Thread Vincent
I figured it out : from django.db import models from django.contrib.auth.models import User # Create your models here. class Events(models.Model): Name = models.CharField(max_length=64) Date = models.DateTimeField() Description = models.CharField(max_length=200) Admin =

What would be the best way to implement a slider bar with django?

2018-08-28 Thread Geoffrey
Hello, I'm a complete noob with django and web development in general, but I'm trying to figure out how one would go about implementing widgets on my website such a slider bars that can make use of the data stored in the django databases. For example, if my database stores a bunch of values, I

Re: Trying to replace a char field with a forgein key feild

2018-08-28 Thread 'Matthew Stroud' via Django users
Thanks for the reply. This is a perfect coverage of steps 1 through 3 in what I'm doing, but it will break when I do step 4. I basically need to extend the model temporarily so the code doesn't break (I just thought of this so I'll try to implement it). Thanks, Matthew Stroud On 8/28/18,

Re: Foreign key auto-created column position in table

2018-08-28 Thread Vladislav Solovei
> Saying that, why is the order of columns important to you? We don’t > typically worry about the order of columns when working with databases. We have some old software that use "positional" SQL query parameters (like a "INSERT INTO table VALUES(...)" ), so we can't add, remove or move the

Re: Foreign key auto-created column position in table

2018-08-28 Thread Mikhailo Keda
No need to worry about columns ordering inside db table -- 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...@googlegroups.com. To post to

RE: Foreign key auto-created column position in table

2018-08-28 Thread Matthew Pava
You can probably just modify the migrations file after it is generated. Just move the statements around. I haven’t tested it myself. Saying that, why is the order of columns important to you? We don’t typically worry about the order of columns when working with databases. From:

Foreign key auto-created column position in table

2018-08-28 Thread Vladislav Solovei
Hil. I have a simple model: class SipPeer(models.Model): name = models.CharField(primary_key=True, max_length=40) type = models.CharField(max_length=10) defaultuser = models.CharField(max_length=40, blank=True, null=True) secret = models.CharField(max_length=40, blank=True,

Re: Error during GeoDjango tutorial documentaion

2018-08-28 Thread Benjamin Smith
Thank you Jason, that was it. On Sun, Aug 26, 2018 at 5:49 PM Jason wrote: > this might be related: > https://groups.google.com/forum/#!topic/geodjango/Imkq2DDI7qg > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from

Re: Check file input extension

2018-08-28 Thread Tim Graham
You can use FileExtensionValidator: https://docs.djangoproject.com/en/stable/ref/validators/#django.core.validators.FileExtensionValidator On Tuesday, August 28, 2018 at 7:35:39 AM UTC-4, René L. Hechavarría wrote: > > Hi everyone, i need check file input format in forms.py, someone have any >

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Mohammad Aqib
Set mysql password. Without password how you can access mysql. See DATABASES = { *'default'*: { *'ENGINE'*: *'django.db.backends.mysql'*, *'NAME'*: *'hospital'*, *'USER'*: *'root'*, *'PASSWORD'*: *'password'*, *'HOST'*: *'localhost'*,

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Sonali Vighne
I will paste full error and stack trace here. This is occurred when I am giving “python manage.py migrate” command Operations to perform: Apply all migrations: admin, auth, contenttypes, sessions Running migrations: Traceback (most recent call last): *File

Re: attribute error

2018-08-28 Thread Andréas Kühne
HI, You are trying to include a view that is called views from the module home in the app jobs. I think what you mean is : path('', jobs.views.home, name='home') Try that instead. Regards, Andréas Den tis 28 aug. 2018 kl 13:35 skrev Imran Sharief : > hi every one i am new to django am

Re: new to django

2018-08-28 Thread Manmeet Singh
Also check out this https://tutorial.djangogirls.org/en/django_start_project/ On Tue, Aug 28, 2018 at 5:11 PM Manmeet Singh <97singh.manm...@gmail.com> wrote: > Check out this tutorial: > > https://www.digitalocean.com/community/tutorials/how-to-create-a-django-app-and-connect-it-to-a-database >

Re: new to django

2018-08-28 Thread Manmeet Singh
Check out this tutorial: https://www.digitalocean.com/community/tutorials/how-to-create-a-django-app-and-connect-it-to-a-database On Tue, Aug 28, 2018 at 5:05 PM nonofo kokotetso wrote: > how do i deploy/run django projects after installing django and python > > -- > You received this message

attribute error

2018-08-28 Thread Imran Sharief
hi every one i am new to django am getting attribute error past from 2 days i got stuck in this error only i have attached the file also plz do help me to resolve this error -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Trying to replace a char field with a forgein key feild

2018-08-28 Thread Codewise IO
You are going to want to create an empty migrations file and edit it to make your data transformations. See this article. https://simpleisbetterthancomplex.com/tutorial/2017/09/26/how-to-create-django-data-migrations.html -- You received this message because you are subscribed to the Google

Check file input extension

2018-08-28 Thread René L . Hechavarría
Hi everyone, i need check file input format in forms.py, someone have any example. Thanks in advance. My model form: class TestModelForm(forms.ModelForm): class Meta: model = TestModel exclude = ('id') widgets = { 'doc_1': forms.FileInput(attrs={'class':

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Mohammad Aqib
make sure you have installed correct Django and MySQLclient versions. If not try to change the versions. or give permissions to user grant usage on schema public to username;grant create on schema public to username; On Tue, Aug 28, 2018 at 1:20 PM Sonali Vighne wrote: > > I am getting this

new to django

2018-08-28 Thread nonofo kokotetso
how do i deploy/run django projects after installing django and python -- 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

Re: Customise Session Engine to distribute session data storage

2018-08-28 Thread Jason
and redis-sessions seems to be a wrapper around with more functionality, but the lib is a little out of date. Got confused by the latest commit in master making it seem it was under maintenance but the latest release is over a year ago. -- You received this message because you are subscribed

Re: Customise Session Engine to distribute session data storage

2018-08-28 Thread Jason
Actually, there's nothing stopping you from using redis for cache and session cache. SESSION_ENGINE = 'django.contrib.sessions.backends.cache' will use your cache to store sessions. and if you use cached_db instead of cache, that data will persist in redis and survive restarts. On Tuesday,

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Jason
sounds like you have some bad syntax in your models. can't diagnose any further without the code. For future reference, when you ask for help, try to give all relevant information in your question. All you give here is the error, but nothing about the code that produces it, (the models). --

Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Sonali Vighne
I am getting this error raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc) django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1064, "You have an error in your SQL syntax; check the manual that corresponds

Re: Help.... Django : Change Backend as mysql and create sample example using django ORM

2018-08-28 Thread Sonali Vighne
I will paste full error and stack trace here. This is occurred when I am giving “python manage.py migrate” command Operations to perform: Apply all migrations: admin, auth, contenttypes, sessions Running migrations: Traceback (most recent call last): *File