django form validation error massage not showing. please help me out

2023-09-15 Thread Mohammad Shahidullah
models.py class Position(models.Model): title = models.CharField(max_length=50) def __str__(self): return self.title class Department(models.Model): title = models.CharField(max_length=50) def __str__(self): return self.title class Employee(models.Model): fu

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
https://meet.google.com/pns-vbmz-sys On Wed, Nov 24, 2021 at 12:08 AM DJANGO DEVELOPER wrote: > okay > > > On Wed, Nov 24, 2021 at 12:04 AM Duncan Santiago < > duncansantiag...@gmail.com> wrote: > >> let's try google meet. >> >> On Tue, 23 Nov 2021 at 11:39, DJANGO DEVELOPER >> wrote: >> >>> ca

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
okay On Wed, Nov 24, 2021 at 12:04 AM Duncan Santiago wrote: > let's try google meet. > > On Tue, 23 Nov 2021 at 11:39, DJANGO DEVELOPER > wrote: > >> can I have you on anydesk or any meeting tool? >> >> On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago < >> duncansantiag...@gmail.com> wrote: >

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
let's try google meet. On Tue, 23 Nov 2021 at 11:39, DJANGO DEVELOPER wrote: > can I have you on anydesk or any meeting tool? > > On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago < > duncansantiag...@gmail.com> wrote: > >> send me your code then, >> or GitHub repo handle. >> >> On Tue, 23 Nov 20

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
can I have you on anydesk or any meeting tool? On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago wrote: > send me your code then, > or GitHub repo handle. > > On Tue, 23 Nov 2021 at 11:27, DJANGO DEVELOPER > wrote: > >> sorry if you get offended because I need a solution. a working solution. >>

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
send me your code then, or GitHub repo handle. On Tue, 23 Nov 2021 at 11:27, DJANGO DEVELOPER wrote: > sorry if you get offended because I need a solution. a working solution. I > am not familiar with javascript. so getting a lot of issues > > On Tue, Nov 23, 2021 at 10:38 PM Duncan Santiago < >

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
sorry if you get offended because I need a solution. a working solution. I am not familiar with javascript. so getting a lot of issues On Tue, Nov 23, 2021 at 10:38 PM Duncan Santiago wrote: > your page also reloads and results may not be displayed on your frontend, > just add this lines on your

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
your page also reloads and results may not be displayed on your frontend, just add this lines on your onclick listerner function(e){ //notice the e parameter, it is the event parameter. e.preventDefault() your code here. } or you can just paste this on your script section (function () {

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
do a demo, enter the URL on the text area and click on the post button. Then send me the logs on the terminal running Django and also open the console and send the output, On Tue, 23 Nov 2021 at 10:21, DJANGO DEVELOPER wrote: > okay let me explain. > I have trained models which tells us that whi

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
okay let me explain. I have trained models which tells us that which website is legitimate or which website is not legitimate. I have integrated that model with my django web app using rest api. I tested the API on postman and working. now I want to get the result on front end using HTML CSS and ja

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
hello, am not sure what the question is. Kindly elaborate. On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER wrote: > I am working on a django based project in which I have integrated ML > trained models to check if a https url is legitimate or not. for this I > need javascript or ajax to call a re

AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
I am working on a django based project in which I have integrated ML trained models to check if a https url is legitimate or not. for this I need javascript or ajax to call a rest api for my form in which I want to send a post request so that I can check if a https url is legitimate or not. *NOT

Django form

2021-11-19 Thread fawemimo olawale
pls i need a help here.. i have created allot of models and having more headache more i created it pls anybody help out!!! Send a url link to a client to fill his/her details form with different details (Client-detail, Bank-detail and beneficiary-detail) the bank and beneficiary

django form

2021-11-15 Thread fawemimo olawale
How can relate this in model and view because form is meant for one person The BankDetail and BeneficiaryDetail are meant for customer Customer Detail title surname first_name other_name phone email_address_1 address_line_1 mean_of_identification (this is a choicefield) identification_number pfa

Re: Django Form Help

2021-08-23 Thread Billy Muller
Never mind, I realized I forgot the save command. Thanks in advance for anyone that was looking into this. On Monday, August 23, 2021 at 4:35:16 PM UTC-4 Billy Muller wrote: > I have a form in Django that requires a little user input and then > executes some commands in doctl and then I want t

Re: Why does my django form with recaptcha send data even empty the recaptcha?

2021-03-13 Thread Sergei Sokov
html {% csrf_token %} {{form.choice_services}} {{form.name}} {{form.telephone_number}} {{form.email}} {{form.message}} {{form.contact_text}} {{ form.captcha }}

Re: Why does my django form with recaptcha send data even empty the recaptcha?

2021-03-12 Thread Chetan Ganji
Remove below line and try again self.fields['captcha'].widget.attrs['required'] = 'True' If the problem persists, try some js or jquery validation in frontend On Thu, Mar 11, 2021, 9:19 PM Gabriel Araya Garcia < gabrielaraya2...@gmail.com> wrote: > Camarada Sokov: > Your code is very diffi

Re: Why does my django form with recaptcha send data even empty the recaptcha?

2021-03-11 Thread Gabriel Araya Garcia
Camarada Sokov: Your code is very difficult to understand at first sight. I did not know about ReCaptchaField(). But, is interesting to learn something new. Recards, Gabriel Araya Garcia GMI - Desarrollo de Sistemas Informáticos from Santiago de Chile El jue, 11 mar 2021 a las 12:40, Sergei So

Why does my django form with recaptcha send data even empty the recaptcha?

2021-03-11 Thread Sergei Sokov
I put the google recaptcha V2 to my django project form. It looks like working, but if I leave empty the recaptcha checkbox my form is sent still. forms.py from django import forms from captcha.fields import ReCaptchaField from django.forms import Textarea from .models import * class CustomerForm

Django form inside a modal (bootstrap)

2020-11-17 Thread Apolo Machine
hello, i'm trying to add a button that open a modal(bootstrap) where i can add a new object car, but when a press the buttom open the service form in the modal i have a working form where i can add new car (name=create-car), how can i open the CarForm inside of the modal? class Car(models.Mod

Re: guys help me please, I cannot upload images from django form,

2020-08-29 Thread Chelsea Fan
6, allaberdi...@gmail.com ( > allaberdi16yazha...@gmail.com) escribió: > >> I can upload images from django admin panel but cannot to do same thing >> with django form , it saves any text but did not save images only, anyone >> help me please >> this is my code: &g

Re: guys help me please, I cannot upload images from django form,

2020-08-29 Thread Jonathan Villavicencio
ilename): return '/'.join([instance.image, filename]) El sáb., 29 de ago. de 2020 a la(s) 11:16, allaberdi...@gmail.com ( allaberdi16yazha...@gmail.com) escribió: > I can upload images from django admin panel but cannot to do same thing > with django form , it saves any text b

guys help me please, I cannot upload images from django form,

2020-08-29 Thread allaberdi...@gmail.com
I can upload images from django admin panel but cannot to do same thing with django form , it saves any text but did not save images only, anyone help me please this is my code: models.py: class Posts(models.Model): Ahal = 'Ahal' Balkan = 'Balkan' Dasoguz = 'Daso

After converting Static to Django form the Menus, not working on mobile device mode

2020-06-18 Thread Hadisur Rahman
The site is perfectly working on itself by default but when I convert it in Django format the only menus. not working when I browse the site in mobile device mode. here is the pic when it is in default mode [image: Screenshot-33.png] After converting in Django format the above pic right side l

Re: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

2020-05-22 Thread chaitanya orakala
gt;>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Document.querySelector(“select”).addEventListener(“change”,(ele)={ >>>> >>>> If ele

Re: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

2020-05-21 Thread chaitanya orakala
istener(“change”,(ele)={ >>> >>> If ele.target.textContent ==”Volvo”: >>> >>> .. >>> >>> Else if >>> >>> ... >>> >>> Else >>> >>> ... >>> >>> }) >>> >>> &g

Re: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

2020-05-20 Thread Devansh Chaubey
gt; .. >> >> Else if >> >> ... >> >> Else >> >> ... >> >> }) >> >> >> >> >> >> Otherwise just send a form to pick the user preference out of Basic, >> Standard, Advanced, get the request and based

Re: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

2020-05-20 Thread chaitanya orakala
inkId=550986> for > Windows 10 > > > > *From: *Sai > *Sent: *21 May 2020 10:00 > *To: *Django users > *Subject: *How to invoke Sub Form which have MULTIPLE OPTIONS to choose > inside Django Form. > > > > Hi Everyone, > > I am pretty much familiar wit

RE: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

2020-05-20 Thread Vishesh Mangla
><span class=tagcolor><span style='color:mediumblue'>...<o:p></o:p></span></span></p><p class=MsoNormal><span class=tagcolor><span style='color:mediumblue'>})<o:p></o:p></span></span></p

How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

2020-05-20 Thread Sai
Hi Everyone, I am pretty much familiar with Django Forms with models. I want to build a Submit Form which consists of attributes like UserName, Email, address field and 3 options to select the packages, for example, Basic, Standard, and Advanced. I have gone through Django Docs but there is no

REG: django form rendering query

2020-05-10 Thread 'Amitesh Sahay' via Django users
Hello All, I have a website, which is up and running. No issues at all.  My Query: I have a form which users could only see once they are successfully logged in. Currently, it have just 5 mandatory fields. However, going forward, I have to incorporate more 30 fields. So it could be a mess if I pu

Re: Django form fields order

2020-04-10 Thread אורי
rder-of-fields-in-django-form Thanks! -- 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 view this discuss

Re: Django form fields order

2020-04-10 Thread Mike Dewhirst
On 10/04/2020 6:24 pm, אורי wrote: Hi Mike, Thanks for your suggestion. But right now, I'm looking for a solution without changing the database and the models. This is the way I do it without changing the database. The only model changes are verbose name and overriding two Django model metho

Re: Django form fields order

2020-04-10 Thread Jason
python dicts are ordered in terms of insertion order as an implementation detail in cpython 3.6, and was made part of the spec in 3.7. You might be getting bit by this. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Django form fields order

2020-04-10 Thread Jorge Gimeno
On Fri, Apr 10, 2020, 12:29 AM אורי wrote: > Hi, > > We are using Django 2.2 and I want to upgrade to Django 3.0. We have a > mixin (written in 2017) that add fields to forms: > > class LocalizedFirstLastNameMixin(object): > def __init__(self, *args, **kwargs): > self.language_code =

Re: Django form fields order

2020-04-10 Thread אורי
Hi Mike, Thanks for your suggestion. But right now, I'm looking for a solution without changing the database and the models. I agree that first name / last name is not the best way to name people but it's already this way in my website (Speedy Net). People are not required to use a real / certific

Re: Django form fields order

2020-04-10 Thread Mike Dewhirst
On 10/04/2020 5:28 pm, אורי wrote: Hi, We are using Django 2.2 and I want to upgrade to Django 3.0. We have a mixin (written in 2017) that add fields to forms: class LocalizedFirstLastNameMixin(object): def __init__(self, *args, **kwargs): self.language_code = kwargs.pop('langua

Re: Django form fields order

2020-04-10 Thread אורי
Hi, I want to add that I checked the Django 3.0 release notes [ https://docs.djangoproject.com/en/3.0/releases/3.0/ ] and also releases from 3.0.1 to 3.0.5 and I didn't find any documentation of this issue. אורי u...@speedy.net ‪On Fri, Apr 10, 2020 at 10:28 AM ‫אורי‬‎ wrote:‬ > Hi, > > We ar

Django form fields order

2020-04-10 Thread אורי
Hi, We are using Django 2.2 and I want to upgrade to Django 3.0. We have a mixin (written in 2017) that add fields to forms: class LocalizedFirstLastNameMixin(object): def __init__(self, *args, **kwargs): self.language_code = kwargs.pop('language_code', 'en') super().__init__(

Django form wizard multiple file uploads problem

2020-04-08 Thread Deniz Bazan
I have a problem with form wizard, I have a form wizard with 3 steps. In step 2, user uploaded several files. In step 3, send the data to the database. I can save files in server in step 2, but if user does not finish the form then files will remain on the server for free.Therefore I should not

guys django form doesn't appear, what could I do?

2020-03-30 Thread Aly_34_04 MR_34_04
django form: from django import forms from .models import Post class PostForm(forms.ModelForm): class Meta: model = Post fields = '__all__' def __init__(self, *args

Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-13 Thread Integr@te System
Hi Issuer, Plz check docs again for resolve your matter. Try either set csrf token cookies or use ensure_csrf_cookie() https://docs.djangoproject.com/en/3.0/ref/csrf/#django.views.decorators.csrf.ensure_csrf_cookie On Fri, Dec 13, 2019, 05:10 হজমুলা খান wrote: > thanx for your advice and i remo

Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-12 Thread হজমুলা খান
thanx for your advice and i removed {% csrf_token %} and still same. problem is not solved. add post form is not showing. On Thursday, December 12, 2019 at 3:24:48 PM UTC, Integr@te System wrote: > > Hi, > > Django view dont render csrf tag within template form, you should check > doc in warn

Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-12 Thread Integr@te System
Hi, Django view dont render csrf tag within template form, you should check doc in warning part https://docs.djangoproject.com/en/3.0/ref/csrf/ And look at the additional way to resolve your problem. On Thu, Dec 12, 2019, 16:45 হজমুলা খান wrote: > i am integrating some apps to make a bigger pr

ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-12 Thread হজমুলা খান
i am integrating some apps to make a bigger project but the problem is when i try insert ckeditor in html login page it is not showing. for this reason i tried to make separate app is to see whats going on here. i am showing you the code in detail. editing/settings.py: .. INSTALLED_APP

Re: Making Django Form dynamically

2019-11-05 Thread Budi Hermansyah
try this... https://www.caktusgroup.com/blog/2018/05/07/creating-dynamic-forms-django/ On Wed, Nov 6, 2019 at 10:11 AM Jordan Micle wrote: > in general when we define django form we set the model of django in class > Meta, like below > > class Form(forms.ModelForm): > &

Making Django Form dynamically

2019-11-05 Thread Jordan Micle
in general when we define django form we set the model of django in class Meta, like below class Form(forms.ModelForm): class Meta: model = ModelName fields = '__all__' But I am going to set this ModelName dynamically like this. class Form(forms

Django-form tools, saving data between multistep form

2019-08-17 Thread mohamed habib
I asked this question here: https://stackoverflow.com/questions/57514544/django-formtools-saving-data-between-form-steps I'm trying to create a multistage form using django-formtools . My problem is that I am not sure why my data is not persisting bet

Overriding Django Form Model Errors

2019-07-28 Thread Metin AKIN
[image: Capture.PNG] [image: Capture - Copy.PNG] Hello, I'm trying to implement a signup form but I couldn't override default field error messages. For example, as you can see I get "your password can't be too similar" error but I want to show them in custom alert window with bootstrap such

Re: django form not saving items to database

2019-07-08 Thread KIKOYO ISAAC
Some lessons about templates with django On Mon, Jul 1, 2019 at 8:29 AM Joe Reitman wrote: > Try this: > > > def sell(request): > if request.method == 'POST': > form = ProductsForm(request.POST) > if form.is_valid(): > print('form is valid') >

Re: django form not saving items to database

2019-07-01 Thread Joe Reitman
Try this: def sell(request): if request.method == 'POST': form = ProductsForm(request.POST) if form.is_valid(): print('form is valid') form.save() return redirect('home') else: form = ProductsForm() retur

django form not saving items to database

2019-07-01 Thread brian
model class Products(models.Model): UNIT = ( ('whole', 'whole unit'), ('item', 'per single item'), ) # category = models.ForeignKey(Category, related_name='products', on_delete=models.CASCADE) ProductName = models.CharField(max_length=255) user = models.Fore

Re: How to print a value on page obtained from a user in Django form?

2019-06-08 Thread Anirudh Jain
First save the form after the user has input values using - `userform.save()` Then get that value using - val = userform.CharField Now send the `val` in the context and show it to user wherever you want PS- `CharField` would be whatever varuable name you have used in form/ModelForm On Sun, 9 Jun

How to print a value on page obtained from a user in Django form?

2019-06-08 Thread Majid Rafiee
I am trying to create a form which asks user to input a value, do some calculations on it and show the results back to the user. Here is what I've done: I have created an app called QMarcum. Inside this app I have this views.py, forms.py and urls.py: views.py from django.shortcuts import rende

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-06-05 Thread Chetan Ganji
... Did you figure out what's wrong? >> >> On Saturday, October 6, 2018 at 6:28:09 AM UTC-7, Jaydeep Borkar wrote: >>> >>> When I try to register a user using Django form, it gives me "UNIQUE >>> constraint failed: auth_user.username". When I t

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-06-05 Thread Chandrashekhar Singh
AM UTC-7, Jaydeep Borkar wrote: >> >> When I try to register a user using Django form, it gives me "UNIQUE >> constraint failed: auth_user.username". When I tried registering the first >> user, it worked, but I couldn't see that entry in my database. When I

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-06-05 Thread Joe Reitman
ed to create another >> model to store user data. User data is stored in the auth.models. It has >> fields already available for what your trying to accomplish. >> >> On Saturday, October 6, 2018 at 8:28:09 AM UTC-5, Jaydeep Borkar wrote: >>> >>> When I tr

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-06-04 Thread Flexian_me
or what your trying to accomplish. > > On Saturday, October 6, 2018 at 8:28:09 AM UTC-5, Jaydeep Borkar wrote: >> >> When I try to register a user using Django form, it gives me "UNIQUE >> constraint failed: auth_user.username". When I tried registering the first

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-05-17 Thread Joe Reitman
> When I try to register a user using Django form, it gives me "UNIQUE > constraint failed: auth_user.username". When I tried registering the first > user, it worked, but I couldn't see that entry in my database. When I tried > registering the second user, it's giv

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-05-17 Thread Guru Murthy
Saturday, October 6, 2018 at 6:28:09 AM UTC-7, Jaydeep Borkar wrote: >> >> When I try to register a user using Django form, it gives me "UNIQUE >> constraint failed: auth_user.username". When I tried registering the first >> user, it worked, but I couldn't see t

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2019-05-17 Thread RAJENDRA MYTHILI 17BIS0120
I'm facing the same issue ... Did you figure out what's wrong? On Saturday, October 6, 2018 at 6:28:09 AM UTC-7, Jaydeep Borkar wrote: > > When I try to register a user using Django form, it gives me "UNIQUE > constraint failed: auth_user.username". When I tried regi

django form help

2019-04-18 Thread Pramod Pandey
Dear all i did not pass drives_a value to drives variable ; i am using django module plz help me if any one using this django module.. #My Code is from django import forms import os drives_a = [chr(x) + "," for x in range(65, 90) if os.path.exists(chr(x) + ':')] class contactForm(forms.Form): d

Cannot update file to a Django form

2019-02-23 Thread Christian Seberino
I can't seem to upload a file to a Django form. The form POST is never valid. Any ideas? Here is my code... def upload_file(request): if request.method == 'POST': form = tummytutoring.forms.UploadFileForm(request.POST, request.FILES) if form.is_valid():

Re: While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2018-10-08 Thread Nelson Varela
You do not have to save the user 2 times in your form: user = user_form.save() user.save() Maybe this is also the problem... -- 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

While registering the user with django form, it gives "UNIQUE constraint failed: auth_user.username" error

2018-10-06 Thread Jaydeep Borkar
When I try to register a user using Django form, it gives me "UNIQUE constraint failed: auth_user.username". When I tried registering the first user, it worked, but I couldn't see that entry in my database. When I tried registering the second user, it's giving me this er

how to filter foreign key in django form without passing foreign key value?

2018-09-27 Thread BBG
I have created two models in my django project AddStudent and Fee Entry as shown below. *models.py* class AddStudent(models.Model): enrollment_no = models.BigIntegerField(primary_key=True) student_name = models.CharField(max_length=500,null=True) gender = models.CharField(max_lengt

Re: Django: Form validation strange behaviour

2017-09-29 Thread Constantine Covtushenko
Hi Paul, You should return value from 'clean_document'. >From your code I see you do not do that. When method returns nothing it is None. That is why you see 'This field cannot be blank.' I hope that make sense. Regards, Constantine C. On Fri, Sep 29, 2017 at 7:01 AM, Paul wrote: > I want to

Django: Form validation strange behaviour

2017-09-29 Thread Paul
I want to do file validation(size,type) on a field on inlineformset. class ProductDocumentModelForm(ModelForm): class Meta: model = ProductDocument fields = ['document'] def clean_document(self): file = self.cleaned_data['document'] validate_file(file, 'document') Becau

Jquery datepicker in a django form

2017-09-11 Thread giuseppe ricci
Hi guys, I need to insert 2 datapicker in a django form. I have not a form.py file. My views.py related to the datepicker: class DatePicker(forms.DateInput): template_name = 'dkey.html' class Media: js = ( 'js/jquery.min.js', 'js/jquery-ui.min.js', ) css =

Re: Django form needs pagination and saved data - how????

2017-07-31 Thread Jim Illback
Super advice - thanks very much, James! Appreciate your help. Jim On Jul 30, 2017, at 5:55 PM, James Schneider mailto:jrschneide...@gmail.com>> wrote: On Jul 30, 2017 4:50 PM, "Jim Illback" mailto:subaru...@hotmail.com>> wrote: Thanks for your reply, James. Appreciate it. BTW, if you check m

Re: Django form needs pagination and saved data - how????

2017-07-30 Thread James Schneider
On Jul 30, 2017 4:50 PM, "Jim Illback" wrote: Thanks for your reply, James. Appreciate it. BTW, if you check my template, the button is within the form tags, but you probably are right on the JS - I don’t know JS much at all so just copied other people’s code. I thought that's how you're suppos

Re: Django form needs pagination and saved data - how????

2017-07-30 Thread Jim Illback
Thanks for your reply, James. Appreciate it. BTW, if you check my template, the button is within the form tags, but you probably are right on the JS - I don’t know JS much at all so just copied other people’s code. I may be mistaken, but I think the wizard link below requires a “static” or semi

Re: Django form needs pagination and saved data - how????

2017-07-30 Thread James Schneider
On Jul 28, 2017 5:56 PM, "Jim Illback" wrote: I use the latest versions of Django, python, bootstrap3, and crispy forms for this project. I am trying to present a list of flashcards to a user, sorted by category (e.g., Math, Vocabulary, etc.). Then, I want the user to check either the full categ

Django form needs pagination and saved data - how????

2017-07-28 Thread Jim Illback
I use the latest versions of Django, python, bootstrap3, and crispy forms for this project. I am trying to present a list of flashcards to a user, sorted by category (e.g., Math, Vocabulary, etc.). Then, I want the user to check either the full category or individual flashcards to be added to t

Re: Django FORM for India Postal Address

2016-11-06 Thread Andreas Kuhne
Hi, There is a plugin called django-smart-selects, that enables you to get information from the server based on information in a select field. You could try that? The form_valid() method and clean methods where you can VALIDATE such information is only called when posting the form (as you have fou

Django FORM for India Postal Address

2016-11-06 Thread Priyabrata Das
I have a Django ModelForm as below. Primary objective is to select area pincode based on selected "state". I don't seem to find a way how can I filter Pincode based on a dynamic queryset on the chosen state. form_valid() method in CreateView is not invoked until the entire form is submitted.

Re: django form converter to PDF

2016-10-03 Thread Ovnicraft
On Mon, Oct 3, 2016 at 7:05 AM, M Hashmi wrote: > Hi, > > I need some simple library to convert a simple quote form to PDF. I tried > xhtml2pdf and few others but need really simple process to use but creating > a fancy pdf. > I highly recommend you check http://wkhtmltopdf.org/ it works really

Re: django form converter to PDF

2016-10-03 Thread Walt
You can also check out the Python wrapper for pdftk. https://github.com/revolunet/pypdftk It allows you to take a pdf form and fill it dynamically and "flatten" it. Aside from that, Weasyprint also works pretty well. Walt On Monday, October 3, 2016 at 8:05:43 AM UTC-4, M Hashmi wrote: > > H

Re: django form converter to PDF

2016-10-03 Thread 06userit
Hello Mudassar, I agree with Ludovic : you could try weasyprint. I am using it on my project and am very satisfied. One hint : if I remember correctly, images on html page should be png in order for pdf to be generated by default. jpg support package is optional. See documentation https://media

Re: django form converter to PDF

2016-10-03 Thread M Hashmi
You are a rockstar in the group man. Let me try it and I will let you know about the results. I didn't get a change to look at Weasy_print. Regards, Mudassar On Mon, Oct 3, 2016 at 5:26 AM, ludovic coues wrote: > the xhtml2pdf doc point to weasyprint [1]. After a quick look at the > doc [2], it

Re: django form converter to PDF

2016-10-03 Thread ludovic coues
the xhtml2pdf doc point to weasyprint [1]. After a quick look at the doc [2], it look like a simple way to generate pdf from html file. If you already have a url on your django app rendering the quote, I would use weasyprint like that: from io import BytesIO from django.http.response impo

django form converter to PDF

2016-10-03 Thread M Hashmi
Hi, I need some simple library to convert a simple quote form to PDF. I tried xhtml2pdf and few others but need really simple process to use but creating a fancy pdf. If anyone knows please let me know. Regards, Mudassar -- You received this message because you are subscribed to the Google Gro

Re: Django form Datetime field valid error after add django.middleware.locale.LocaleMiddleware'

2016-09-06 Thread 广宏伟
nMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware', > 'django.middleware.locale.LocaleMiddleware'

Django form Datetime field valid error after add django.middleware.locale.LocaleMiddleware'

2016-09-04 Thread 广宏伟
SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.loc

Re: Help with django form an ajax, error 500

2016-08-21 Thread Fred Stluka
Elros Romeo, Can you see the log file?  It may show details of the 500 error, which will likely be some error reported by your Django code. Could be anything from a Python syntax error to a failed attempt to connect to a DB, to a misconfigured settings file, or anyth

Re: Help with django form an ajax, error 500

2016-08-17 Thread Constantine Covtushenko
Sorry guys, please skip my previous post. It appeared unfinished. My correct one below. Hi Andrew, To have a proper `to_python` transformation from `POST` strings please use forms. They do that perfectly and also they can handle any king of user input validations. form = SomeCustomForm(request

Re: Help with django form an ajax, error 500

2016-08-17 Thread Constantine Covtushenko
Hi Andrew, To have a proper `to_python` transformation from `POST` strings please use forms. They do that perfectly and also they can handle any king of user input validations. form = SomeCustomForm(request.POST) form.is_valid(): parsed_dictionary = form.cleaned_data() As for 'Ajax'. It seem

Re: Help with django form an ajax, error 500

2016-08-17 Thread agapito treviño
Elros Romeo as defined by the form.as_p.? I want to implement this El viernes, 15 de julio de 2016, 18:49:00 (UTC-5), Elros Romeo escribió: > > Hi, i hope you can help me, im trying to make a django post form without > reloading the page using ajax, but im getting error 500 when submit, can >

Re: Help with django form an ajax, error 500

2016-08-10 Thread Andrew Beales
Guessing this is old news, but there are 2 problems with views: ProductoConcepto.objects.create(producto=producto, orden=orden, cantidad=cantidad) - producto and orden need to be Python objects and cantidad is a float, but the request.POST values will be string representations. Also the ajax

Re: Help with django form an ajax, error 500

2016-07-16 Thread ludovic coues
The error should come with a backtrace. Providing the backtrace will help a lot in finding the error. 2016-07-15 19:52 GMT+02:00 Elros Romeo : > Hi, i hope you can help me, im trying to make a django post form without > reloading the page using ajax, but im getting error 500 when submit, can you >

Help with django form an ajax, error 500

2016-07-15 Thread Elros Romeo
Hi, i hope you can help me, im trying to make a django post form without reloading the page using ajax, but im getting error 500 when submit, can you help me to fix this, this is my code: *models.py* class ProductoConcepto(models.Model): producto = models.ForeignKey(Producto) orden = models.For

Re: django form data not saving to database

2016-06-28 Thread kaustubh tripathi
athi wrote: > > Hi everyone! > > I am creating a simple webapp using django where a user can login, choose > one of the given category and create a post under the chosen category. > > I am having trouble in creating a post. When I create a new post through > django form the date

Re: django form data not saving to database

2016-06-28 Thread Luis Zárate
login, choose one of the given category and create a post under the chosen category. > > I am having trouble in creating a post. When I create a new post through django form the date isn't saved to database. I log in to the django-admin to check if the post is created but the 'pos

django form data not saving to database

2016-06-28 Thread kaustubh tripathi
Hi everyone! I am creating a simple webapp using django where a user can login, choose one of the given category and create a post under the chosen category. I am having trouble in creating a post. When I create a new post through django form the date isn't saved to database. I log in t

Re: multiple INSERT with django form

2016-05-09 Thread Derek
provides some clues). On Friday, 6 May 2016 18:20:03 UTC+2, thol...@gmail.com wrote: > > Hi > > I'm trying to create a django form based on the model. The model contains > fields: username, date, shift, department, team. Team and Department are > defined in different app and

multiple INSERT with django form

2016-05-06 Thread tholtorff
Hi I'm trying to create a django form based on the model. The model contains fields: username, date, shift, department, team. Team and Department are defined in different app and are extending the user through UserProfile. I would like to have a table that is generated automatically bas

Re: Allow users to submit django form once per day

2015-07-29 Thread Nkansah Rexford
Okay guys, After some days of thinking about the problem, I'm through with this approach, which is totally horrible, I guess, but works. The code snippet can be found here: https://gist.github.com/seanmavley/c9a4af36c2693d9b437a I'm posting back here because although the approach works, its no

Re: Allow users to submit django form once per day

2015-07-23 Thread Carl Meyer
On 07/23/2015 01:32 PM, Nkansah Rexford wrote: > You can save the datetime of the last form submission and check > whether its oneday or not in the view. If its one day then show pass > the form or else dont. > > Hope this helps. > > > I do know I have to save the date stamp, but

Re: Allow users to submit django form once per day

2015-07-23 Thread Nkansah Rexford
> > You can save the datetime of the last form submission and check whether > its oneday or not in the view. If its one day then show pass the form or > else dont. > > Hope this helps. > I do know I have to save the date stamp, but the question is Where? On the model class, the user class, or

Re: Allow users to submit django form once per day

2015-07-23 Thread Maxim Boyarskiy
You can check how django rest framework solves it: http://www.django-rest-framework.org/api-guide/throttling/ -- 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 dja

  1   2   3   4   >