Kensmoney's Posts
Nairaland Forum › Kensmoney's Profile › Kensmoney's Posts
Daejoyoung:this is my mode.py class Record (models.Model): id = models.IntegerField(default=0, primary_key=True) name = models.CharField(max_length=100) product = models.CharField(max_length=100) price = models.CharField(max_length=100) description = models.CharField(max_length=100) |
Good guys!! i am new in django, i am trying to save data to db but is not saving. this is the my view.py from django.shortcuts import render from .models import Record def Create(request): data = Record() if request.method == "POST": data.name = request.POST.get("name" ) data.product = request.POST.get("product" ) data.price = request.POST.get("price" ) data.description = request.POST.get("description" ![]() data.save() return render(request, "html/home.html" ) THIS IS MY HTML FILE <form class="myform" action="create/" method="POST"> <h1> Add Records </h1> {% csrf_token %} <div class="container"> <label role="name">name</label> </div> <div> <input type="text" id="name" name="name"> </div> <div class="container"> <label role="description">product</label> </div> <div> <input type="text" id="product" name="product"> </div> <div class="container"> <label role="price">price</label> </div> <div> <input type="text" id="price" name="price"> </div> <div class="container"> <label role="description">description</label> </div> <div> <input type="text" id="description" name="description"> </div> <div class="container"> <button type="submit" class="btn"> Save </button> </div> </form> |
Learn programming (HTML, CSS and JavaScript) and tank me later |
YorubaEmir:Plz add me 07038034761 |
For the past 10 months that I sign up, I have been applying for Junior full stack developer, I HV not gotten any invitation for interview, I have done all the necessary things, my profile is up to date. Wat is going on @ getdev |
Can a junior developer apply for this opening? |
[quote author=daisy1 post=77940841]As a Fullstack engineer in our team, you are responsible for building, deploying, and maintaining products(websites/mobile apps) from end to end. You will be responsible for making our UI element interactive, building secure and scalable applications from front-end end to back-end. You are expected to understand working with rough sketches, be naturally creative and edit frontend, as well as with sound experience and expertise in backend Technology requirement: HTML, CSS, Javascript, NodeJS, PHP. Pay is attractive and candidate must reside in Lagos state. Please send CV and links to previous work done to recruitment@velvetruemedia.com You are free to apply if you know your onus but you haven't had the opportunity to creatively use your skill. Good day op, I HV only one yr experience as a fullstack developer, the projects that I HV completed recently includes crud app and gp calculator. but I am looking for an opportunity to enhance my performance. My tech stack includes HTML, css, bootstrap, JavaScript, react js, nodejs , python, flask. Pls can I apply? |
[quote author=Dthinkerman post=77824544]Locate "Terminal" on VS Code and open it. Then each time you need to run your code, save the changes first and then on the terminal, type the Python version you are using, followed by a space, followed by the name of the file you want to run, on which you have written your code. For instance, if you are using Python 3 and the name of file is hello.py then type "python3 hello.py" then slab the Enter key. This method is the best, learn how to use CMD, it will help u when start developing large App |
, |
I use => color: #fff; Still getting d same error Plz help |
Still having the same issue, HV have pass DAT stage should plz help |
[quote author=conquerorsword post=77311104]Guys please help, i am on the preliminary assesment test, the app is not displaying, and my codes are not being saved, I've done everything I do. And my time is going. Same here ooo |
trixandra:HV u done urs? If yes share ur experience, |
trixandra:HV u done urs? |
Iretii0511:U need to login with ur github account , in order to get started |
Has anyone started taking the Homestudy test? Has your challenge one passed?[/quote]my own hv not pass ooo, i followed their instruction still d same |
Has anyone received the interview challenge? Cycle 44 yes, i just started my own now hv u done urs? |
jstutorials:. u can use it at backend aswell when can we use it at d frontend? |
What is d application area of split() |
Who can tutor someone react js? What's me 07038034761 |
What exactly do u want to do with d code? Define ur problem correctly |
dauddy97:Though I don't HV experience in django, I hv used flask in many project, use template engine to render ur data, then query users table (user class instance) by id In flask is done like dis => @app.route("/Edith/<int:id>", methods=["POST"])> def Edith(id): If request =="post": // do ur query However u can check d doc for better explanation |
Anyone who HV done his/her own should share experience CUS DAT first challenge is giving error |
VIVIACHRIS:I think is 3 challenge. HV u completed urs? |
I am trying to do d first challenge but iam getting THE ERROR YOUR SELECT ELEMENT NEEDS TO HAVE AN OPTION THAT HAVE NO VALUE ATTRIBUTE, IS SELECTED BY DEFAULT AND DISABLED My HTML code div class="select select-currency"> <select class="select-text"> <option value="" hidden required > Choose Currency </option> <option value="USD" > USD </option> </select> </div> <button type="submit" class="btn" value="Convert"> Convert </button> Plz help |
I could HV done it for u but I don't HV VB compiler. But try and learn how to use if statement, if else or case . U can still make use of google. Hapyy coding |
Nice one bro, u need to add validation to prevent it from submitting empty form |
mikezuruki:Go for JavaScript, is like using one stone to kill two bird |
[quote author=webapi post=74366258]Javascript and php serves two different purposes. JS is client side while php is server side. You cannot directly perform a CRUD in database using just JS. Php works with server. Meaning you must either be on local server or live server but JS can work on browser without a server... So to answer you question, Learn both but one after the other.[/qu With this ur comment i will assume dat u are not a developer . JavaScript is perfect for web, ranging from front end to back end, front end( vue, angular, react etc) back end(node js) There are a lot of JavaScript framework u can use for web/ mobile development |

