Comments (19)
Hello @jorgeassuncao
The codebase will be updated soon. You've spotted a regression added by the latest commits.
Please wait.
from django-datta-able.
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 templatetags
. You need to use django custom templatetags
to achieve the expected behaviour.
from django-datta-able.
In home
apps urls.py
files just comment out the views
from admin_datta
and import views
from home
.
Just like this
from django-datta-able.
I've made the above changes but the problem persists.
Do you need anything from me to help debig this? the complete views.py
, index.html
,...?
P.S.: I've just made the changes proposed on the fist post, will try now the second.
from django-datta-able.
@mominur-helios my file is diferent from yours, are you shure this is Datta Able Django?
Readme.MD:
> Built with [App Generator](https://appseed.us/generator/), timestamp `2023-07-22 22:58`
- `Up-to-date dependencies`
- Database: `mysql`
- UI-Ready app, Django Native ORM
- `Session-Based authentication`, Forms validation
- `Dark Mode` (enhancement)
- Persistent via browser `local storage`
Changelog.md
## CodeBase version: 2stable.0.1 / 2022-01-15
### Improvements
- Dependencies update (all packages)
- Django==4.0.1
- Settings update for Django 4.x
- `New Parameter`: CSRF_TRUSTED_ORIGINS
- [Origin header checking isn`t performed in older versions](https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins)
My /apps/home/urls.py
dont have admin_datta
...
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from django.urls import path, re_path
from apps.home import views
###
from . import views
###
urlpatterns = [
# The home page
path('', views.index, name='home'),
# Matches any html file
re_path(r'^.*\.*', views.pages, name='pages'),
]
from django-datta-able.
Fixed in version v1.0.23
.
To test, please do the following & let us know the results.
- download the latest version
- create two Products using Django CLI or Admin Section
- Edit
home/views.py
to loadproducts
into the main template
def index(request):
context = {
'segment' : 'index',
'products' : Product.objects.all() # <-- Uncomment this line
}
return render(request, "pages/index.html", context)
The HOMEpage needs to be like this:
from django-datta-able.
Had this errors rinning pip3 install -r requirements.txt
. Are they normal?
DEPRECATION: django-admin-datta is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for django-admin-datta ... done
DEPRECATION: django-api-generator is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for django-api-generator ... done
DEPRECATION: django-dynamic-datatb is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559```
from django-datta-able.
This is new. Let us investigate.
@mominur-helios please take a look at this warning.
TY
from django-datta-able.
They appear on Dynamic Tables.
from django-datta-able.
This is new. Let us investigate.
@mominur-helios please take a look at this warning.
TY
from django-datta-able.
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)
from django-datta-able.
from django-datta-able.
Can you share your repo with us?
Just add app-generator
as a contributor.
from django-datta-able.
It's done.
https://github.com/jorgeassuncao/d23e8dd6-1347-499f-85bb-88bb4507108c
from django-datta-able.
just wait a few minutes, i'm syncyng the repo.
P.S.: It's now synced
from django-datta-able.
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:
from django-datta-able.
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?
from django-datta-able.
@mominur-helios can you advise here?
from django-datta-able.
Patch validated. Closing.
@jorgeassuncao let us know anytime if you need further assistance.
from django-datta-able.
Related Issues (20)
- How to open the sidebar with a button HOT 2
- Installation as admin theme HOT 2
- Create a custom app on django-datta-able failed HOT 2
- disabling the forced login / redirect HOT 4
- Displaying new app view HOT 3
- Django default admin panel issue HOT 1
- Disabling a menu option HOT 3
- Yg HOT 1
- Form field not displaying in Page HOT 3
- var not displaying in index.html: HOT 2
- sidebar incomplete and "javascript;" links erroring HOT 4
- Auth URLs HOT 2
- ERROR: Stopping generation because post_gen_project hook script didn't exit successfully HOT 1
- Building wheel for ninja (pyproject.toml) did not run successfully.
- this app is really good, I am new here, and I want to try to use docker to start this app HOT 2
- I need some instructions on how to remove the navbar on left side the sidebar HOT 1
- admin_datta.forms could not be resolved
- Logout not working in Django 5
- It runs very slowly under MySql DB. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-datta-able.