-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data not displayed in Index.html #32
Comments
I've made the above changes but the problem persists. Do you need anything from me to help debig this? the complete P.S.: I've just made the changes proposed on the fist post, will try now the second. |
@mominur-helios my file is diferent from yours, are you shure this is Datta Able Django? Readme.MD:
Changelog.md
My
|
Hello @jorgeassuncao The codebase will be updated soon. You've spotted a regression added by the latest commits. Please wait. |
Fixed in version To test, please do the following & let us know the results.
def index(request):
context = {
'segment' : 'index',
'products' : Product.objects.all() # <-- Uncomment this line
}
return render(request, "pages/index.html", context)
|
Had this errors rinning
|
This is new. Let us investigate. @mominur-helios please take a look at this warning. TY |
|
Is the line UNcommented in the controller? Products are not injected by default. def index(request):
context = {
'segment' : 'index',
'products' : Product.objects.all() # <-- Uncomment this line
}
return render(request, "pages/index.html", context) |
Can you share your repo with us? Just add |
just wait a few minutes, i'm syncyng the repo. P.S.: It's now synced |
The project is updated, please pull. https://github.com/jorgeassuncao/d23e8dd6-1347-499f-85bb-88bb4507108c You were still using the previous version. Now is updated to the latest release of Datta Able. We recommend starting fresh with the latest version of Datta Able and adding your own code on top: |
I'm still new to this all Django stuff, so maybe i've made a mistake along the way. Sorry for the trouble... Just a quick question, if i use more than one "query" on a page (results from diferent tables) whats the corret way to do it? Just add them like these? def index(request):
context = {
'segment' : 'index',
'products' : Product.objects.all(),
'services' : Service.objects.all()
}
return render(request, "pages/index.html", context) And how to make a "query" available on all pages? |
@mominur-helios can you advise here? |
Hello @jorgeassuncao , if you use more than one "query" on a page then yes your approach is correct. and if you want to make a "query" available on all pages then there is concept in django |
Patch validated. Closing. |
Changes are saved in
test1
branchA new model data Site is displayed in index page.
@mominur-helios please take a look
The text was updated successfully, but these errors were encountered: