skip to Main Content

How to send API data to a HTML?

While I fetched the data successfully, I cannot manage to display the data to an HTML efficiently. The only way that that it works(how far I've gotten) is with two endpoints. Where one endpoint is to load the API data…

VIEW QUESTION

Html – How to create instance of a django model

views.py def create_post(request): profile_inst = Profile.objects.filter(author_real=request.user).first() print(profile_inst) if request.method == 'POST': print('POST request') form = CreatePost(request.POST,request.FILES) if form.is_valid(): print(request.FILES) form.save() else: print('JUST a VISIT!') form=CreatePost(initial={'author':profile_inst}) return render(request,'create_post.html',{'form':form}) ValueError at /create_post/ Cannot assign "'username | admin'": "Post.author" must be a "Profile"…

VIEW QUESTION

Php versions – I am trying to run a laravel application but i am getting this error

My composer.json file { "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": "^7.3||^8.0", "brian2694/laravel-toastr": "^5.5", "fideloper/proxy": "^4.0", "intervention/image": "^2.4", "laravel/framework": "5.6.*", "laravel/tinker": "^1.0", "ext-gd": "*" }, "require-dev": { "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4",…

VIEW QUESTION
Back To Top
Search