Django - always getting False in form.is_valid()

2019-04-19 Thread Sipum Mishra
Hi All, I am always getting - form.is_valid returning False. kindly check where I am doing wrong. please find below code. views.py --- def home(request): if request.method == 'POST': form = ListForm(request.POST or None) print(form.is_valid(), "-->",request.POST['Item']) print(form.er

Re: Django - always getting False in form.is_valid()

2019-04-20 Thread Sipum Mishra
Hi Vineeth, please find below is the output -> On Fri, 19 Apr 2019 at 19:04, vineeth sagar wrote: > can you please post, request.POST output? > > On Fri, 19 Apr 2019, 16:34 Sipum Mishra, wrote: > >> Hi All, >> >> I am always getting - form.is_valid retu

Re: Django - always getting False in form.is_valid()

2019-04-20 Thread Sipum Mishra
Hi Vineeth, when I am trying to add 'add testing' through html form for todo list app getting this above form.is_valid() always False. On Sat, 20 Apr 2019 at 23:02, Sipum Mishra wrote: > Hi Vineeth, > > please find

Storing HTML in DB using DJANGO

2019-04-20 Thread Sipum Mishra
Hi friends, I want to store a html in database using python and need to retrieve that html and convert that in to PDF. can u plz suggest me how to store that HTML in DB ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Django - always getting False in form.is_valid()

2019-04-21 Thread Sipum Mishra
hould see that it complains about > "completed" "this field is required" > > Note that providing default value in a model is not same as making field > optional. > > On Fri, Apr 19, 2019 at 2:05 PM Sipum Mishra wrote: > >> Hi All, >> >> I a

Re: Django - always getting False in form.is_valid()

2019-04-21 Thread Sipum Mishra
Jani, Do you mean I need to change completed field in model like as below ? completed = models.BooleanField(default=False,required=False) On Sun, 21 Apr 2019 at 17:23, Sipum Mishra wrote: > Hi Jani, > form.errors gives error as - > > itemThis field is > required.< > /li&g

Re: Django - always getting False in form.is_valid()

2019-04-21 Thread Sipum Mishra
Sun, 21 Apr 2019 at 17:27, Sipum Mishra wrote: > Jani, Do you mean I need to change completed field in model like as below ? > > completed = models.BooleanField(default=False,required=False) > > On Sun, 21 Apr 2019 at 17:23, Sipum Mishra wrote: > >> Hi Jani, >> fo

Re: Django - always getting False in form.is_valid()

2019-04-21 Thread Sipum Mishra
eanField(required=False) >> TypeError: __init__() got an unexpected keyword argument 'required' >> >> >> On Sun, 21 Apr 2019 at 17:27, Sipum Mishra wrote: >> >>> Jani, Do you mean I need to change completed field in model like as >>> b

Re: Storing HTML in DB using DJANGO

2019-04-21 Thread Sipum Mishra
gt;> This way you’d store raw data. >> >> >> On Apr 21, 2019, at 8:41 AM, Jani Tiainen wrote: >> >> Well after all, HTML is just plain text... Though you probably want to >> think to do some sanitization so you won't get nasty injections via html. >>

Re: Integrating Google calendar API in TODO list

2019-04-24 Thread Sipum Mishra
Joel, i know there is python code for yhat API but how to integrate it.. I want to know that.. I tried to do but failed. On Wed, 24 Apr, 2019, 6:55 PM Joel Mathew, wrote: > Just do it. The API has python sample code. > Sincerely yours, > > Joel G Mathew > > > > On Tue, 23 Apr 2019 at 09:58, Sip

Re: Django issue with NoModuleError

2019-05-13 Thread Sipum Mishra
Hi RLM, Did you import samples in root urls.py Like as below >From samples import urls Hope it will solve ur error. Thanks. On Mon, 13 May, 2019, 7:45 PM John Bagiliko, wrote: > Try this in samples/urls.py > > from django.urls import path > from . import views > > urlpatterns = [ > path(

Re: Getting MultiValueDictKeyError

2019-05-16 Thread Sipum Mishra
Hi friends, still getting same error after using encrypt.. Bt if i am using request. POST. get('document') then error vanishes but another error comes as job_title is an invalid keyword argument for this function. Kindly help on this issue. I m trying hard but unable to solve. Thanks On Thu, 16

Re: Customising django user model

2019-05-20 Thread Sipum Mishra
Ok thanks for reply. On Mon, 20 May, 2019, 5:36 PM Rafael E. Ferrero, wrote: > Hello, you must to extend User model... search on google with this > aproach!! > > Cheers! > > Rafael E. Ferrero > > > El dom., 19 may. 2019 a las 14:13, Sipum () escribió: > >> Hello Friends, >> >> I want to customis

Re: Customising django user model

2019-05-20 Thread Sipum Mishra
Thanks a lot.. @Joe @Mahes It will help me a lot. On Tue, 21 May, 2019, 8:14 AM mahesh boini, wrote: > Extend AbstractUser class and give that name in settings file like > AUTH_USER_MODEL=‘appname.modelname’ > > On Tue, 21 May 2019 at 05:51, Joe Reitman wrote: > >> You can customize the user ta

Re:

2019-06-04 Thread Sipum Mishra
Hi Pradeep, You are using a non nullable field image. And for that you have to provide a default value. Without default value it is unable find. On Tue, 4 Jun, 2019, 9:12 PM Pradeep Singh, wrote: > why i am getting these error ..please help me to fix it > > thanks in advance > > -- > You rece

Re: Name error

2019-06-05 Thread Sipum Mishra
Plz show your code otherwise search your total error line in Google you can find it. Always try to paste error codes so that it will b easy to find out error. Thanks. On Wed, 5 Jun, 2019, 3:12 PM RAJA MISHRA, wrote: > Name error : name 'django' is not defined in one of my app > Plzz anyone expl

Re: Django question.

2019-06-09 Thread Sipum Mishra
Hi Bhaskar, You can write your helper functions inside utils.py and can use it wherever you want. And basically utils.py contains utility functions or helper functions. Thanks. On Sun, 9 Jun, 2019, 2:29 AM Bhashkar Bisht, wrote: > HI there is there any best way to create django helper class >

Re: Django App - Database connection

2019-06-14 Thread Sipum Mishra
Hi sapna, Check your settings.py file and search for DATABASE there you can get a link which is commented. Copy n paste that url and that will take you to documentation page where you can get what needs to be imported in DATABASE. On Fri, 14 Jun, 2019, 4:45 PM Sapna Dhage, wrote: > > Hello, > >

Re: ManyToMany no Model

2019-06-19 Thread Sipum Mishra
Ggt yano jika teme sulo faso tadan siku. Lhggg On Wed, 19 Jun, 2019, 5:55 PM Christian Oliveira, < christianoliveir...@gmail.com> wrote: > Bom dia, como posso fazer para acessar os dados de uma tabela derivada de > um ManyToMany?? > > -- > You received this message because you are subscribed to t

Re: Wrong Redirect

2019-06-20 Thread Sipum Mishra
Hi Ramadhan, Instead of rendering to any page please use HttpResponseRedirect('put home page url where u want to redirect' ). And also import django.http import HttpResponseRedirect Do the above & let me know. I hope it will work. On Thu, 20 Jun, 2019, 2:41 PM ramadhan ngallen, wrote: > Hello

Re: action in a form

2019-06-23 Thread Sipum Mishra
Hello, In action use the url associated with that view then it will work for you. If not then kindly tell what errors you are getting. Thanks. On Sun, 23 Jun, 2019, 10:17 PM Sebastian Jung, wrote: > Hello, > > You must Put in Action not a Name from a function. You must Put a url dir > example

Re: action in a form

2019-06-23 Thread Sipum Mishra
Hi bengoshi, If i m not wrong, your concern is when you add action ='journal' then data are not saved. Right? Thanks. On Mon, 24 Jun, 2019, 2:07 AM bengoshi, wrote: > Thanks for your responses. I didn't describe it well.. if I write > > > it calls the url journal and this is the my requested

Re: invalid literal for int() with base 10: 'admin'

2019-06-25 Thread Sipum Mishra
Can u plz attach your urls.py as functions associated in views.py Thanks. On Mon, 24 Jun, 2019, 8:08 PM Harshit Agarwal, wrote: > Hi guys, > I am currently working on a working on a project. Everything is working > fine but i am not able to access my admin. How can i solve this? > Here is my S

Re: invalid literal for int() with base 10: 'admin'

2019-06-25 Thread Sipum Mishra
Plz share views.py as well.. I hvae mentioned two. Kindly share. On Tue, 25 Jun, 2019, 8:47 PM Harshit, wrote: > Here is urls.py of my app > > from django.urls import path > from . import views > from django.conf import settings > from django.conf.urls.static import static > > app_name="music" >

Re: invalid literal for int() with base 10: 'admin'

2019-06-26 Thread Sipum Mishra
Your problem is, in url you are passing id to detailview, but in views.py you have done anything with that... Check this again. On Wed, 26 Jun, 2019, 4:01 AM onyilimba martins mclaren tochukwu, < tochimcla...@gmail.com> wrote: > I guess it's Django 2.2? > > -- > You received this message because

Re: Get Value of Drop Down

2019-06-26 Thread Sipum Mishra
Hello csn u plz share ur codes as well as errors. On Thu, 27 Jun, 2019, 12:09 AM Aayush Bhattarai, < bhattaraiaayus...@gmail.com> wrote: > Hi, > I have encountered a problem. How can I get the value of dropdown, > Boolean Field and send it to the database. Note: I am not using forms.py > files an

Re: trying to use a variable inside a static content tag

2019-07-27 Thread Sipum Mishra
Hi Lyman, PFB. Configure the following setting in your setting.py STATIC_ROOT = os.path.join(BASE_DIR,"static_files") STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"),) load *staticfiles* tag to template {% load staticfiles %} and then use in *src* attribute

Re: dlango MultiValueDictKeyError

2019-08-05 Thread Sipum Mishra
Hey Ajit, This error comes when You are trying to get username, passwords from the form. It is due to the below reason - In Login, You are using -> request.POST['username'] which will raise a KeyError exception if 'username' is not in request.POST. Instead use -> request.POST.get('username') whi