I have created a project using Golang. I have used PostgreSQL as the database. Now I want to make an admin panel for this project using Django. I want directly reflect the database tables in the Django admin panel. As I am not running the project under the Django server and I don't have any apps and models, how can I show them in the admin panel?
Create Django admin panel where project is created using another language
156 Views Asked by Barun Bhattacharjee At
2
There are 2 best solutions below
2
n0cuous
On
First create an empty project in django then in settings.py set your database as postgreSQL
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'customers',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '5432',
}
}
make sure to create superuser for login in admin panel and proper urls for the same.
Add models in models.py and register it in admin.py
P.S - make sure you have installed psycopg2 using pip command.
Related Questions in DJANGO
- Django Admin Panel and Sub URLs Returning 404 Error on Deployment
- How to return HTTP Get request response from models class in Django project
- Issue with Quantity Increment in Django E-commerce Cart
- Can't install Pipenv on Windows
- use dict from python in django html template and also in js
- 'pyodbc.Cursor' object has no attribute 'callproc', mssql with django
- Django socketio process
- Root path analogue in uWSGI as in Uvicorn
- Django - ModuleNotFoundError: No module named 'backend'
- Does Python being a loosely typed programming language make it less secure?
- sorl-thumbnail adds a background color when padding is used
- Can't connect to local postgresql server from my docker container
- Why ProductHunt api dont work with Python?
- why i have to put extra space in before write option selected because it show error if i don't ' option:selected'
- Django Arrayfield migration to cloud sql (Postgresql) not creating the column
Related Questions in POSTGRESQL
- Only the first SQL script gets executed inside Docker Postgres container
- Compare fields in two tables
- Hibernate ClobJdbcType bindings: what are the diferences?
- Postgres && statement Error in Mybatis Mapper?
- Can this query be optimized? (Choosing a random row to insert, that excludes previously inserted Rows)
- Connection terminated unexpectedly while performing multi row insert using pg-promise
- Processing multiple forms in nodejs and postgresql
- How to copy data from SQLite to postgreSQL?
- PGAdmin4 configured behind a reverse proxy but unable to connect to Postgresql server
- Updates to pgsodium encrypted values don't use specified key_id
- Connecting to Postgres running in a Docker container using psql
- Can't connect to local postgresql server from my docker container
- Django Arrayfield migration to cloud sql (Postgresql) not creating the column
- Get list of matching keywords for each post
- docker-compose can't reset postgresql database
Related Questions in DJANGO-ADMIN
- Django Admin Panel and Sub URLs Returning 404 Error on Deployment
- Django admin page doesn't open, when I use Kong gateway
- In the Django-admin, interleave readonly and (regular) editable fields
- Unable to login to Django admin panel after implementing custom user model
- How to dynamically change resource class in Django Import-Export admin based on user group?
- Readonly map for GeoDjango fields in Django>=4.0?
- how to solve this problem I am a junior programmer
- I can't open the Django admin site on my Pydroid3
- How to add Chosen Groups or Chosen user permissions in Django Admin Panel
- Why am I getting DoesNotExist for the parent model in save_related
- Django admin : How to show a model as inline inside another model, which is indirectly related
- Django admin do not recognize superuser
- How to implement 2FA using the django-two-factor-auth package for a specific admin site within a project containing multiple independent admin sites?
- I think iam getting something wrong
- Export shows badgateway in nginx
Related Questions in DJANGO-POSTGRESQL
- How to use DateField in an ArrayField in django
- How to connect Django project to containerized PostgreSQL database?
- Django Migration Error with PostGIS: 'double free or corruption (out) Aborted (core dumped)
- Django 3.2 REST API : Postgressql video upload fails
- How do I fix a database configuration error when securing Django Admin with two factor authentication using custom user model and database?
- Using field in Trunc's kind property
- I need a simple python Django login example using database credentials
- PostgreSQL table partitioning using Djano
- Django Queryset: group by two field values
- I'm not able to connect proxy host database in Django
- How to apply annotation to each item of QuerySet with Django ORM
- What do I do to fix my PostgreSQL database connection problem in Django?
- Create Django admin panel where project is created using another language
- Django in connection with Postgres says settings.DATABASES is improperly configured
- Django SearchQuery and SearchRank not finding results when 1 word matches in a 2 word query
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What you want is to use an existing DB to be managed by the DJango admin. To do this you must create a django project and create the models for each table. This is very tedious so there is an official process so you don't have to do all this work and it is done automatically.
https://docs.djangoproject.com/en/4.1/howto/legacy-databases/