Giter Site home page Giter Site logo

app-generator / django-datta-able Goto Github PK

View Code? Open in Web Editor NEW
528.0 13.0 230.0 3.6 MB

Datta Able - Open-Source Django Dashboard | AppSeed

Home Page: https://appseed.us/product/datta-able/django/

License: Other

Shell 0.05% Dockerfile 0.09% Python 2.70% HTML 25.74% CSS 68.05% JavaScript 2.68% SCSS 0.69%
django django-dashboard django-template django-admin-theme django-theme django-boilerplate django-bootstrap datta-able django-library datta-template

django-datta-able's People

Contributors

admin-dashboards avatar app-generator avatar benfaruna avatar dependabot[bot] avatar mominur-helios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-datta-able's Issues

Navbar not appearing on mobile view

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!

sidebar incomplete and "javascript;" links erroring

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:
image

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):

image

Console Error:
Not Found: /javascript;
[18/May/2023 15:12:45] "GET /javascript; HTTP/1.1" 404 10860

Displaying new app view

I'm facing a problem with your template "django-datta-able", i can't display my app view on it "flight/views.py" .
i tried to change the url in "core/urls.py" but it didn't work
you will find in attached :
"core/urls.py "
"apps/flight/urls.py"
"apps/home/urls.py && apps/home/views.py "

Thank you.

Capture d’écran 2022-04-24 à 1 09 29 PM

Capture d’écran 2022-04-24 à 1 09 29 PM

Capture d’écran 2022-04-24 à 1 07 59 PM

Capture d’écran 2022-04-24 à 1 07 59 PM

Capture d’écran 2022-04-24 à 1 06 45 PM

Logout not working in Django 5

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 ?

Create a custom app on django-datta-able failed

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.

  1. Create a new app demo1 on django-datta-able foler by python manage.py startapp demo1
  2. Install app demo1 on core.settings
  3. Create an view on demo1.views
def index(request):
    return HttpResponse("Hello World")
  1. Create demo1.urls file and added below code
from django.urls import path, re_path
from . import views

urlpatterns = [

    path('', views.index, name='index'),

]
  1. Include demo1.urls to core.urls by adding 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

admin_datta.forms could not be resolved

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.

Data not displayed in Index.html

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

var not displaying in index.html:

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!

Auth URLs

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?

Disabling a menu option

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!

disabling the forced login / redirect

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?

ERROR: Stopping generation because post_gen_project hook script didn't exit successfully

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:
Inkedcmd_4MdGN6Bmk4

Any idea what's going on? I got the original cookiecutter working just fine.

Building wheel for ninja (pyproject.toml) did not run successfully.

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.


Dockerfile:12

10 | # install python dependencies
11 | RUN pip install --upgrade pip
12 | >>> RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | COPY . .

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

Form field not displaying in Page

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:

  1. Used requirement.txt to setup Django-datta-able in a folder after venv env

  2. 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})

  3. forms.py : from django import forms
    from .models import Client

class ClientForm(forms.ModelForm):
class Meta:
model = Client
fields = ['name', 'email', 'phone']

  1. Template in templates/home/page-blank.html :
  2.                                        <p><h2>Add a New Client</h2>
                                                 <form method="post">
                                                     {% csrf_token %}
                                                     {{ form.as_p }}
                                                     <input type="submit" value="Submit">
                                                 </form>
                                             </p>
    
  3. Model:
    from django.db import models
    from django.contrib.auth.models import User

models.py

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
  1. The URL was not tampered with:
    from django.urls import path, re_path
    from apps.home import views

urlpatterns = [

# The home page
path('', views.index, name='home'),

# Matches any html file
re_path(r'^.*\.*', views.pages, name='pages'),

]

http://127.0.0.1:8000/page-blank.html
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.