Re: Unable to change db sqllite to mysql

2019-07-11 Thread Jorge Gimeno
On Thu, Jul 11, 2019 at 6:55 PM john samuel wrote: > Hi shreeram, > > But the fact is that i have changed the port number in xampp server for > mySQL as 3307. > > On Thu, Jul 11, 2019 at 9:19 PM SHREERAM KULKARNI < > shreeramvkulka...@gmail.com> wrote: > >> DATABASES = { >> 'default': { >>

Re: Unable to change db sqllite to mysql

2019-07-11 Thread john samuel
Hi shreeram, But the fact is that i have changed the port number in xampp server for mySQL as 3307. On Thu, Jul 11, 2019 at 9:19 PM SHREERAM KULKARNI < shreeramvkulka...@gmail.com> wrote: > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.mysql', > 'NAME':

Re: Unable to change db sqllite to mysql

2019-07-11 Thread SHREERAM KULKARNI
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'DB_NAME', 'USER': 'DB_USER', 'PASSWORD': 'DB_PASSWORD', 'HOST': 'localhost', # Or an IP Address that your DB is hosted on 'PORT': '3306', }} On Fri, 12 Jul 2019,

WebSocket handshak Error

2019-07-11 Thread Fatemeh Ahmadzadeh
Hi my friends I create daphne.sock for websocket and gunicorn.sock for http request and and in nginx.conf proxy_pass equals to unixes. but have this errors 1. failed: Error during WebSocket handshake: Unexpected response code: 404 2. failed: Error during WebSocket handshake:

Followed 'Writing custom django-admin commands' - 'Apps aren't loaded yet.'!

2019-07-11 Thread paul_d_sm...@hotmail.com
I've got a basic Django site up and running and am now trying to write a custom command by following the "Writing custom django-admin commands" documentation. However having followed it carefully I get this exception: (myfrontier) C:\Users\PDS\git\myfrontier>set

Unable to change db sqllite to mysql

2019-07-11 Thread john samuel
Hi Guys, I've done everything from installing sql,setting up of root and password till xampp server installation and setting the port number correctly with right installation of sqlclient and editing Database in setting as DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql',

WEb socket Error 404

2019-07-11 Thread Fatemeh Ahmadzadeh
Hi our friend I create daphne.sock for websocket and gunicorn.sock for http request and and in nginx.conf proxy_pass equals to unixes. python manage.py runworker is ok without any Errors but have this errors in nginx 1. failed: Error during WebSocket handshake: Unexpected response

Re: Form validations

2019-07-11 Thread Charles Wright
It sounds to me like you may want to use validators for your form. Here are two links that might help you out: https://stackoverflow.com/questions/17165147/how-can-i-make-a-django-form-field-contain-only-alphanumeric-characters https://docs.djangoproject.com/en/2.2/ref/validators/ On Thu, Jul

Querying works on shell but not on the Django program code

2019-07-11 Thread Daniel Roseman
I'm not sure why you think that a linting error would stop your code from running. Does it actually work when you run the server? If not, what error do you get then? -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Form validations

2019-07-11 Thread Khaleel Ahmed H. M. Shariff
Yes you could validate user input using regular expression. Explore the re module. Best of luck God Bless On Thu, 11 Jul 2019, 11:22 p.m. Irfan Khan, wrote: > Yeah currently I do have modelforms but I need to know using regular > expression can we done > > On Thu, 11 Jul 2019 at 6:36 PM, Jani

Re: Form validations

2019-07-11 Thread Irfan Khan
Yeah currently I do have modelforms but I need to know using regular expression can we done On Thu, 11 Jul 2019 at 6:36 PM, Jani Tiainen wrote: > Hi. > > Usually you validate user input and by using Forms or ModelForms. > > > to 11. heinäk. 2019 klo 12.50 Irfan Khan kirjoitti: > >> Dear

Re: saving inherited model overwrites base model

2019-07-11 Thread Kalev Takkis
If it receives fields from parent model, I would assume it actually has access to them. In my case, 'comment' field queried from child model returns empty while the field in parent has value. Something's definitely wrong here, I removed inheritance and created explicit OneToOne to Contact and

Re: Form validations

2019-07-11 Thread Jani Tiainen
Hi. Usually you validate user input and by using Forms or ModelForms. to 11. heinäk. 2019 klo 12.50 Irfan Khan kirjoitti: > Dear members, > I wanted to validate the form which contains the name, phone number, > address,email, etc.., > I have developed and tested it if we give any character

Add a custom method to default django packages

2019-07-11 Thread Gaziza Yestemirova
Inside of the django project, there is a folder /lib/site-packages/reversion And here in models.py I want to add one method, which will convert unicode to python list How I can make extend and add this in my custom class? -- You received this message because you are subscribed to the Google

Attribute Error 'NoneType' object has no attribute '_prefetch_related_lookups'

2019-07-11 Thread Warwick Lewarne
Hi all, I keep getting the above error and I am not sure what I need to do to correct it. An example will assist. my model: class Product_Group(models.Model): customer_id = models.ForeignKey(Customer, on_delete=models.CASCADE) prod_group = models.CharField(max_length=30, unique = True,

Form validations

2019-07-11 Thread Irfan Khan
Dear members, I wanted to validate the form which contains the name, phone number, address,email, etc.., I have developed and tested it if we give any character it’s saving to database table.so I wanted to validate the every field for example In name field it should take only alphabets, And in