Re: Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-06-22 Thread Peter of the Norse
I think you might be better off using https://docs.djangoproject.com/en/3.2/topics/migrations/#squashing-migrations than having it recreate all of them. > On Mar 18, 2021, at 8:28 AM, Olivier wrote: > > Hello, >

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
Sure sir thank you again On Wed, Jun 23, 2021 at 8:10 AM DJANGO DEVELOPER wrote: > +923012876771, you can send me your queries here. > > On Wed, Jun 23, 2021 at 7:39 AM DJANGO DEVELOPER > wrote: > >> is it resolved now? or still want some help? >> >> On Tue, Jun 22, 2021 at 9:44 PM mayank sand

Re: How to insert into multiple tables cascading

2021-06-22 Thread DJANGO DEVELOPER
please share your related models and form as well. On Wed, Jun 23, 2021 at 1:22 AM David Crandell wrote: > Hello, I come from a platform where I built out forms and then manually > wrote insert statements from the form input entering all the data at once. > > What I want to do is enter a custome

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
+923012876771, you can send me your queries here. On Wed, Jun 23, 2021 at 7:39 AM DJANGO DEVELOPER wrote: > is it resolved now? or still want some help? > > On Tue, Jun 22, 2021 at 9:44 PM mayank sandikar < > mayanksandikar191...@gmail.com> wrote: > >> Thank you sir, sorry for all the troubles.

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
is it resolved now? or still want some help? On Tue, Jun 22, 2021 at 9:44 PM mayank sandikar < mayanksandikar191...@gmail.com> wrote: > Thank you sir, sorry for all the troubles. > > On Tue, Jun 22, 2021 at 4:41 PM DJANGO DEVELOPER > wrote: > >> request.FILES used when we need to insert images a

Re: Problem to connect to database only when run "migrate"

2021-06-22 Thread Heron
Thank you Aziz Regards, _ Heron hero...@gmail.com _ Em ter., 22 de jun. de 2021 às 15:29, Aziz Meknassi escreveu: > Hi Heron, > > To make sure you are talking to your database, > in your project and in your command line, type > python manage.py shell > then i

How to insert into multiple tables cascading

2021-06-22 Thread David Crandell
Hello, I come from a platform where I built out forms and then manually wrote insert statements from the form input entering all the data at once. What I want to do is enter a customer (one table), have it populate a master region with the same name (another table), then fill out a master location

Re: Problem to connect to database only when run "migrate"

2021-06-22 Thread Aziz Meknassi
Hi Heron, To make sure you are talking to your database, in your project and in your command line, type python manage.py shell then import your model If for example you have prodApp and model Product from prodApp.models import Product prd = Product.objects.all() print(prd) Please checkout ORM (

Re: Django Admin: object history not working

2021-06-22 Thread Ryan Kite
Thanks for the clarification, I didn't realize it only applied to changes administered directly from the Django Admin. Was interested in learning about an objects' change history, but in this case, the changes were not performed from the Django Admin. On Tuesday, June 22, 2021 at 5:50:10 AM

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
Thank you sir, sorry for all the troubles. On Tue, Jun 22, 2021 at 4:41 PM DJANGO DEVELOPER wrote: > request.FILES used when we need to insert images as well. if there is no > image field then remove the request.FILES. > > On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER > wrote: > >> follow th

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
have you removed for loop from your form? On Tue, Jun 22, 2021 at 8:33 PM DJANGO DEVELOPER wrote: > because it is necessary to write when there are no more conditions left. > > On Tue, Jun 22, 2021 at 6:31 PM avdesh sharma > wrote: > >> what will happen if I change from elif to else ? >> FYI -

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
because it is necessary to write when there are no more conditions left. On Tue, Jun 22, 2021 at 6:31 PM avdesh sharma wrote: > what will happen if I change from elif to else ? > FYI - I checked it but still getting same error. > > On Tue, Jun 22, 2021 at 2:51 PM DJANGO DEVELOPER > wrote: > >>

Re: Help me - Django and python

2021-06-22 Thread avdesh sharma
what will happen if I change from elif to else ? FYI - I checked it but still getting same error. On Tue, Jun 22, 2021 at 2:51 PM DJANGO DEVELOPER wrote: > your index.html > > > PASSWORD > class="form-control" name="password" placeholder="Enter Password"> > > > {% if login == 'inacti

Re: Django Admin: object history not working

2021-06-22 Thread Christian Ledermann
I am not sure what you are asking about. The history works out of the box, but only when you manipulate entries via the django admin. When you change the model instance through your own views, you have to explicitly create the log entry. On Tue, 22 Jun 2021 at 00:48, Ryan Kite wrote: > Hello, >

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
request.FILES used when we need to insert images as well. if there is no image field then remove the request.FILES. On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER wrote: > follow this code's pattern but remember one thing that you have to follow > it according to your needs. > > On Tue, Jun 22

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
follow this code's pattern but remember one thing that you have to follow it according to your needs. On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER wrote: > def insetdata(request): > product_form = your_product_form() > if request.method == 'POST': > product_form = your_produc

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
def insetdata(request): product_form = your_product_form() if request.method == 'POST': product_form = your_product_form(request.POST, request.FILES) if product_form.is_valid: product_form.save() return redirect('put your product's url name value here

Deploy Django app using cpanel

2021-06-22 Thread Eugene TUYIZERE
Dear Team, I have an issue. I want to make my app productive. I bought a domain and I got cpanel credentials. The problem I have now is that I do not know how I can configure the app in cpanel so that users can start browsing it. I tried to connect to the database and I loaded the application file

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
Thank you sir, the html problem is solved, but I don't know how to insert itemname, quantity and rate in the database On Tue, Jun 22, 2021 at 4:15 PM DJANGO DEVELOPER wrote: > is your code working now? > > On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER > wrote: > >> First of all please remove

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
is your code working now? On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER wrote: > First of all please remove the for loop from your form. > secondly please add{{displayemp.userquantity_field}} > {{displayemp.amount_field}} > > On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar < > maya

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
Edit .button { border: none; color: black; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; } .button2 {background-color: #008CBA;}

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
First of all please remove the for loop from your form. secondly please add{{displayemp.userquantity_field}} {{displayemp.amount_field}} On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar < mayanksandikar191...@gmail.com> wrote: > view.py > def displaydata(request): >results = editupd

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
forms.py from django import forms from django.forms import fields from project.models import editupdaterecord class empforms(forms.ModelForm): class Meta: model=editupdaterecord fields="__all__" On Tue, Jun 22, 2021 at 3:57 PM mayank sandikar < mayanksandikar191...@gmail.com

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
models.py from django.db import models class editupdaterecord(models.Model): id = models.IntegerField(primary_key=1) Itemname = models.CharField(max_length=100) quantity = models.IntegerField(blank=True, null=True, default=0) basicamount = models.IntegerField(blank=True, null=T

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
view.py def displaydata(request): results = editupdaterecord.objects.all() if request.method=='POST': if request.POST.get('userquantity') : quantity = request.POST.get('userquantity') a = editupdaterecord.objects.all() print(a) # if results in a < qu

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
my index.html is Edit .button { border: none; color: black; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; } .button2 {background-color: #008CBA;}

Re: Help me Please - Django and python program

2021-06-22 Thread mayank sandikar
Hello sir, I'm trying to insert the data in the table. For example in database Itemname quantity price user-quantity amount pen20 5 00 book 20 10 00 in my database I'm getting this result pen20

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
according to your code, you're trying to update the product record. right? If so, then you're doing things the right way. On Tue, Jun 22, 2021 at 9:50 AM mayank sandikar < mayanksandikar191...@gmail.com> wrote: > hello , sir your mobile no. is not on whatsapp. please assist me with > this > > On

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
your index.html PASSWORD {% if login == 'inactive' %} User Inactive! Contact Admin! {% elif login == 'invalid' %} line 32 username or password Invalid {% endif%} {% if tab_error == True %} Invalid Tab Selected {% endif %} changed index.html PASSWORD {% if lo

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
by seeing your code, it seems that only the 'else' part is working. have you provided value='{{dict_key.model_password_field}} in your html input element? On Tue, Jun 22, 2021 at 12:52 PM avdesh sharma wrote: > Here is my View.py code > > from django.shortcuts import render > from django.http im

Re: Help me - Django and python

2021-06-22 Thread avdesh sharma
Here is my View.py code from django.shortcuts import render from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib.auth import authenticate, logout, login from django.contrib.auth.decorators import login_required from student.models import * from django.vi