app-generator / django-datta-able Goto Github PK
View Code? Open in Web Editor NEWDatta Able - Open-Source Django Dashboard | AppSeed
Home Page: https://appseed.us/product/datta-able/django/
License: Other
Datta Able - Open-Source Django Dashboard | AppSeed
Home Page: https://appseed.us/product/datta-able/django/
License: Other
First of all, I have to say that this app is wonderful, and the designs are just beautiful. However, I can't seem to display the navbar properly in mobile views. Any help would be very much appreciated. Thank you and keep up the good work!
Hello! So I just pulled the latest repo and after initial set up, when I run the app (both through python manage.py runserver and through docker compose), the sidebar does not show the components/formats/charts/etc..
Here is what the page displays:
Now, when I go, for example, to click on the 'Settings" option (or any option) in the settings drop down (upper-right), I get the below page (console error pasted below):
Console Error:
Not Found: /javascript;
[18/May/2023 15:12:45] "GET /javascript; HTTP/1.1" 404 10860
if I visit this url http://localhost:8000/admin
then it redirects me to this url http://localhost:8000/login/?next=/admin
I just created a project with this template and Django 5 is return 405 erro code. Digging closer, I can see that GET method is not allowed for logging out a user.
Anyone with this issue ? How did you fix it ?
I need some instructions on how to remove the navbar on left side the sidebar and update the style.css to use all space avaiable when sidebar is removed.
Hello,
I am pretty new to Django and trying to using django-dotta-able, and I have tried to create a simple helloworld app named demo1
, but always got errors. I do this by below steps. I am not sure what is wrong on my steps.
It would be really helpful if there's step-by-step guidance docs on how to create a simple custom apps/pages on django-dotta-able.
demo1
on django-datta-able
foler by python manage.py startapp demo1
demo1
on core.settings
def index(request):
return HttpResponse("Hello World")
from django.urls import path, re_path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
path("demo1/", include("demo1.urls")),
Then I access by http://127.0.0.1:8000/demo1
and got Error 404
, on the console I saw [04/Feb/2022 03:20:28] "GET /demo1 HTTP/1.1" 200 3011
without error.
OS: MacOS 12.1
Python: 3.9.0
when i run pip install -r requirements.txt
i got this:
Using legacy 'setup.py install' for django-admin-datta, since package 'wheel' is not installed.
Using legacy 'setup.py install' for django-dynamic-datatb, since package 'wheel' is not installed.
Using legacy 'setup.py install' for django-api-generator, since package 'wheel' is not installed.
Issue raised in support (Discord)
Changes are saved in test1
branch
A new model data Site is displayed in index page.
Views.py
units = Site.objects.all().values()
context = {
'segment': 'index',
'units' : units
}
return render(request, "pages/index.html", context)
Template,
pages/index.html
{% for unit in units %}
>> {{ unit.site_id }}, {{ unit.site_name }}, {{ unit.sitecol }}, {{ unit.lat }}, {{ unit.long }}
<br/>
{% endfor %}
@mominur-helios please take a look
def index(request):
context = {
'segment': 'index',
'a1'='yyy'
}
return render(request, "pages/index.html", context)
index.html >{{ a1 }}
i want to display 'yyy' in the index.html.but when i run the server ,the page displayed normally but 'yyy' was not display . may i know why ?thanks!
Can we install this as a custom admin theme?
Hi y'all
Just started learning Django, decided to start play around with this template. Just stuck with one thing: the tuts show that with the default django admin I can access Models with a general view like: .../admin/auth/users or .../admin/auth/groups. For some reason I can't do that with this template, I get a 404. When I flat out type .../admin, i get a 500.
Were the default urls changed somehow?
I just want to change the database from SQLite to MySql. But it is very very very slowly.
Do you know how to fix this?
If you add the "disabled" class to a menu option list item it will have the disabled look, however, it can still be "active" and the link still works if clicked.
If you add the "disabled" class to the anchor tag within the list item instead, there is an unintended consequence where if you click on the disabled menu twice, the currently active menu dissapears from the menu list.
Also, I would like to know which method should be used, adding disabled to the list item tag or to the anchor tag.
Thank You!
how to remove the redirect to the login page so i can create a normal webpage with an option for the user to create an account to access the dashboard?
I keep getting this error when trying to create a new project. I've installed all the requirements and properly configured my PostgreSQL database too
Full Traceback:
Traceback (most recent call last): File "C:\Users\Praneeth\AppData\Local\Temp\tmpouuf66dn.py", line 48, in <module> post_hook() File "C:\Users\Praneeth\AppData\Local\Temp\tmpouuf66dn.py", line 22, in post_hook copy_tree(fromDirectory, toDirectory) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\distutils\dir_util.py", line 123, in copy_tree raise DistutilsFileError( distutils.errors.DistutilsFileError: cannot copy tree './tmp/apps/static': not a directory ERROR: Stopping generation because post_gen_project hook script didn't exit successfully Hook script failed (exit status: 1)
Here's the full configuration/command prompt log:
Any idea what's going on? I got the original cookiecutter working just fine.
OS: Raspbian on raspberry Pi.
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
sudo apt update
sudo apt install cmake ninja -y
cd django-datta-able
docker-compose up --build
output:
[ 5/10] RUN pip install --no-cache-dir -r requirements.txt:
#0 4.620 Collecting django (from -r requirements.txt (line 1))
#0 4.883 Downloading Django-4.2.3-py3-none-any.whl (8.0 MB)
#0 5.571 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 11.8 MB/s eta 0:00:00
#0 5.904 Collecting gunicorn (from -r requirements.txt (line 2))
#0 5.936 Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)MB 12.6 MB/s eta 0:00:00
#0 5.946 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 30.0 MB/s eta 0:00:00
#0 6.058 Collecting python-dotenv (from -r requirements.txt (line 3))
#0 6.086 Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)
#0 6.207 Collecting whitenoise (from -r requirements.txt (line 4))
#0 6.236 Downloading whitenoise-6.5.0-py3-none-any.whl (19 kB)
#0 6.295 Collecting django-admin-datta==1.0.10 (from -r requirements.txt (line 5))
#0 6.327 Downloading django-admin-datta-1.0.10.tar.gz (3.3 MB)
#0 6.563 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 14.3 MB/s eta 0:00:00
#0 7.042 Preparing metadata (setup.py): started
#0 9.300 Preparing metadata (setup.py): finished with status 'done'
#0 9.369 Collecting django-dynamic-datatb==1.0.25 (from -r requirements.txt (line 11))
#0 9.399 Downloading django-dynamic-datatb-1.0.25.tar.gz (21 kB)
#0 9.445 Preparing metadata (setup.py): started
#0 11.69 Preparing metadata (setup.py): finished with status 'done'
#0 11.84 Collecting django-api-generator==1.0.17 (from -r requirements.txt (line 12))
#0 11.87 Downloading django-api-generator-1.0.17.tar.gz (10 kB)
#0 11.92 Preparing metadata (setup.py): started
#0 14.17 Preparing metadata (setup.py): finished with status 'done'
#0 14.39 Collecting djangorestframework (from django-dynamic-datatb==1.0.25->-r requirements.txt (line 11))
#0 14.42 Downloading djangorestframework-3.14.0-py3-none-any.whl (1.1 MB)
#0 14.51 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 12.4 MB/s eta 0:00:00
#0 15.44 Collecting pandas (from django-dynamic-datatb==1.0.25->-r requirements.txt (line 11))
#0 15.47 Downloading pandas-2.0.3.tar.gz (5.3 MB)
#0 15.89 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.3/5.3 MB 12.6 MB/s eta 0:00:00
#0 18.36 Installing build dependencies: started
#0 107.1 Installing build dependencies: still running...
#0 202.9 Installing build dependencies: still running...
#0 263.0 Installing build dependencies: still running...
#0 323.2 Installing build dependencies: still running...
#0 397.1 Installing build dependencies: still running...
#0 471.2 Installing build dependencies: still running...
#0 552.8 Installing build dependencies: still running...
#0 639.9 Installing build dependencies: still running...
#0 659.2 Installing build dependencies: finished with status 'done'
#0 659.2 Getting requirements to build wheel: started
#0 749.5 Getting requirements to build wheel: still running...
#0 815.3 Getting requirements to build wheel: still running...
#0 887.7 Getting requirements to build wheel: still running...
#0 966.1 Getting requirements to build wheel: still running...
#0 1033.6 Getting requirements to build wheel: still running...
#0 1101.0 Getting requirements to build wheel: still running...
#0 1150.6 Getting requirements to build wheel: finished with status 'done'
#0 1150.6 Preparing metadata (pyproject.toml): started
#0 1156.1 Preparing metadata (pyproject.toml): finished with status 'done'
#0 1157.2 Collecting matplotlib (from django-dynamic-datatb==1.0.25->-r requirements.txt (line 11))
#0 1157.5 Downloading matplotlib-3.7.1.tar.gz (38.0 MB)
#0 1162.0 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.0/38.0 MB 8.0 MB/s eta 0:00:00
#0 1169.2 Installing build dependencies: started
#0 1186.4 Installing build dependencies: finished with status 'done'
#0 1186.4 Getting requirements to build wheel: started
#0 1189.6 Getting requirements to build wheel: finished with status 'done'
#0 1189.6 Installing backend dependencies: started
#0 1193.8 Installing backend dependencies: finished with status 'done'
#0 1193.8 Preparing metadata (pyproject.toml): started
#0 1196.9 Preparing metadata (pyproject.toml): finished with status 'done'
#0 1197.1 Collecting asgiref<4,>=3.6.0 (from django->-r requirements.txt (line 1))
#0 1197.1 Downloading asgiref-3.7.2-py3-none-any.whl (24 kB)
#0 1197.2 Collecting sqlparse>=0.3.1 (from django->-r requirements.txt (line 1))
#0 1197.2 Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB)
#0 1197.3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.2/41.2 kB 28.3 MB/s eta 0:00:00
#0 1197.3 Requirement already satisfied: setuptools>=3.0 in /usr/local/lib/python3.9/site-packages (from gunicorn->-r requirements.txt (line 2)) (58.1.0)
#0 1197.4 Collecting typing-extensions>=4 (from asgiref<4,>=3.6.0->django->-r requirements.txt (line 1))
#0 1197.5 Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)
#0 1198.1 Collecting pytz (from djangorestframework->django-dynamic-datatb==1.0.25->-r requirements.txt (line 11))
#0 1198.1 Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB)
#0 1198.2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 9.3 MB/s eta 0:00:00
#0 1198.7 Collecting contourpy>=1.0.1 (from matplotlib->django-dynamic-datatb==1.0.25->-r requirements.txt (line 11))
#0 1198.7 Downloading contourpy-1.1.0.tar.gz (13.4 MB)
#0 1200.3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.4/13.4 MB 9.2 MB/s eta 0:00:00
#0 1201.2 Installing build dependencies: started
#0 1223.2 Installing build dependencies: finished with status 'error'
#0 1223.2 error: subprocess-exited-with-error
#0 1223.2
#0 1223.2 × pip subprocess to install build dependencies did not run successfully.
#0 1223.2 │ exit code: 1
#0 1223.2 ╰─> [45 lines of output]
#0 1223.2 Collecting meson[ninja]>=1.1.0
#0 1223.2 Downloading meson-1.1.1-py3-none-any.whl (918 kB)
#0 1223.2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 918.4/918.4 kB 4.5 MB/s eta 0:00:00
#0 1223.2 Collecting meson-python>=0.13.1
#0 1223.2 Downloading meson_python-0.13.2-py3-none-any.whl (79 kB)
#0 1223.2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 5.0 MB/s eta 0:00:00
#0 1223.2 Collecting pybind11>=2.10.4
#0 1223.2 Using cached pybind11-2.10.4-py3-none-any.whl (222 kB)
#0 1223.2 Collecting ninja>=1.8.2 (from meson[ninja]>=1.1.0)
#0 1223.2 Downloading ninja-1.11.1.tar.gz (27 kB)
#0 1223.2 Installing build dependencies: started
#0 1223.2 Installing build dependencies: finished with status 'done'
#0 1223.2 Getting requirements to build wheel: started
#0 1223.2 Getting requirements to build wheel: finished with status 'done'
#0 1223.2 Preparing metadata (pyproject.toml): started
#0 1223.2 Preparing metadata (pyproject.toml): finished with status 'done'
#0 1223.2 Collecting pyproject-metadata>=0.7.1 (from meson-python>=0.13.1)
#0 1223.2 Downloading pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
#0 1223.2 Collecting tomli>=1.0.0 (from meson-python>=0.13.1)
#0 1223.2 Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
#0 1223.2 Collecting packaging>=19.0 (from pyproject-metadata>=0.7.1->meson-python>=0.13.1)
#0 1223.2 Using cached packaging-23.1-py3-none-any.whl (48 kB)
#0 1223.2 Building wheels for collected packages: ninja
#0 1223.2 Building wheel for ninja (pyproject.toml): started
#0 1223.2 Building wheel for ninja (pyproject.toml): finished with status 'error'
#0 1223.2 error: subprocess-exited-with-error
#0 1223.2
#0 1223.2 × Building wheel for ninja (pyproject.toml) did not run successfully.
#0 1223.2 │ exit code: 1
#0 1223.2 ╰─> [9 lines of output]
#0 1223.2 Traceback (most recent call last):
#0 1223.2 File "/tmp/pip-build-env-miua2mz1/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
#0 1223.2 cmkr = cmaker.CMaker(cmake_executable)
#0 1223.2 File "/tmp/pip-build-env-miua2mz1/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 148, in init
#0 1223.2 self.cmake_version = get_cmake_version(self.cmake_executable)
#0 1223.2 File "/tmp/pip-build-env-miua2mz1/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
#0 1223.2 raise SKBuildError(msg) from err
#0 1223.2
#0 1223.2 Problem with the CMake installation, aborting build. CMake executable is cmake
#0 1223.2 [end of output]
#0 1223.2
#0 1223.2 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 1223.2 ERROR: Failed building wheel for ninja
#0 1223.2 Failed to build ninja
#0 1223.2 ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
#0 1223.2 [end of output]
#0 1223.2
#0 1223.2 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 1223.2 error: subprocess-exited-with-error
#0 1223.2
#0 1223.2 × pip subprocess to install build dependencies did not run successfully.
#0 1223.2 │ exit code: 1
#0 1223.2 ╰─> See above for output.
#0 1223.2
#0 1223.2 note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
ERROR: Service 'appseed-app' failed to build : Build failed
Good day,
I have been having a challenge in displaying form fields in a template/home/page-blank.html page
Here are the steps I took:
Used requirement.txt to setup Django-datta-able in a folder after venv env
My view is set as:
from django import template
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.template import loader
from django.urls import reverse
from django.shortcuts import render
from .forms import ClientForm
def blank_page(request):
if request.method == 'POST':
form = ClientForm(request.POST)
if form.is_valid():
form.save()
else:
form = ClientForm()
print(form.errors)
return render(request, 'page-blank.html', {'form': form})
forms.py : from django import forms
from .models import Client
class ClientForm(forms.ModelForm):
class Meta:
model = Client
fields = ['name', 'email', 'phone']
<p><h2>Add a New Client</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit">
</form>
</p>
class Client(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
phone = models.CharField(max_length=20)
def __str__(self):
return self.name
urlpatterns = [
# The home page
path('', views.index, name='home'),
# Matches any html file
re_path(r'^.*\.*', views.pages, name='pages'),
]
nginx: [emerg] host not found in upstream "appseed_app:5005" in /etc/nginx/conf.d/appseed-app.conf:2
there is something wrong , what should I do, thanks ahead.
In this theme, we need to move the mouse aside to open the sidebar but I want to use a button instead of that. How can I do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.