CORS policy issue when using with JSON and DJANGO

2019-07-08 Thread Mayank Tripathi
Hi Team, I am making quiz app, for which i wrote a function in view which will generate the json file and place it under the same location as of my all teamplates (C:/Desktop/Environment/envQuiz/quizsetup/templates/quizsetup) Now I am trying to read this json file in my HTML page via javascript

Django - PrePopulate the Foreign Key on the web page, and use that id to save the model.

2020-04-11 Thread Mayank Tripathi
Hi All, I am facing an issue, to pre-populate the Foreign Key on the web page. Actually i have two models Projects and Modules. To create a Module, one has to select the Project and go to Module page for create it, but there the Project is not populated. Below are the details... Please guide me

django dependent drop down list without using javascript; ajax; jquery

2020-04-11 Thread Mayank Tripathi
Hi All, Could any one please share some details on how we can do dependent drop down list selection. I am seeing lot of videos or content to handle this via JavaScript; AJAX; jquery etc.. but just wondering if Django has anything which can be handled easily. -- You received this message becau

Django - What is the best approach to handle multiple user types…and route the HTML pages based on this?

2020-04-26 Thread Mayank Tripathi
I'm making a small test project with below user types: School Admin, Teacher, Student, Parent. And each user type will have different Permissions like School Admin has full access... Parents can only view their Childern's Activity. Teacher can see all students but can add / edit marks for the

Django Type Error with POST method

2020-05-01 Thread Mayank Tripathi
Hi All, I am working on small hands-on project.. and having an issue when calling the POST method with form.py Below is the code. Here i have two models.. one is Category and another is SubCategory. For SubCategory i have created form "SubCategoryFormv2" in forms.py... where i am checking if ca

overriding __init__ in forms.ModelForm is erroring with POST method

2020-05-01 Thread Mayank Tripathi
Hi All, I am working on small hands-on project.. and having an issue when calling the POST method with form.py overriding __init__. Below is the code. Here i have two models.. one is Category and another is SubCategory. For SubCategory i have created form "SubCategoryFormv2" in forms.py... wher

Can we use Database with Django without creating models

2020-05-25 Thread Mayank Tripathi
Hi Team, I am trying to get options to connect to Database from Python-Django App. But here the requirement is I already have a Database setup (MySQL) with all required tables and fields. So am not willing to use models.py and create tables. Is there a way still i can use the tables... and still

Customer premissions based on Membership plan

2020-10-06 Thread Mayank Tripathi
Hi All, I am working on hands-on Django web application, and for this i have to provide access to some videos; products based on the Customer Membership plan. Like if a Customer is in Basic Plan, then allow only to view 10 videos or so.. and for Permium Customer, no limit. For such type of req

Django django_filters DateFilter customization

2021-01-22 Thread Mayank Tripathi
Hi All, I am look for a solution where I can restrict the user to select date from current month only instead of selecting any other month or year. Currently user can select past month as well, have to restrict for current month only in date picker. Please help. Below is the code. filters.py