Re: Django Admin Shortcuts

2024-05-29 Thread Faisal Mahmood
ly. Please >> let me know if you have any further questions! >> >> 1. >> Have you considered including a section in the Django admin documentation >> that outlines the new shortcuts and how to use them? >> >> Yes, I absolutely will document this, I was thinki

Re: Django Admin Shortcuts

2024-05-28 Thread utibe solomon
he PR and provide some feedback. I > copied all of your concerns here and responded to them accordingly. Please > let me know if you have any further questions! > > 1. > Have you considered including a section in the Django admin documentation > that outlines the new shortcuts and

Re: Django Admin Shortcuts

2024-05-28 Thread Faisal Mahmood
here and responded to them accordingly. Please > let me know if you have any further questions! > > 1. > Have you considered including a section in the Django admin documentation > that outlines the new shortcuts and how to use them? > > Yes, I absolutely will document this, I was

Re: Django Admin Shortcuts

2024-05-28 Thread Mike Schem
Hey Faisal, Thanks for taking the time to read the PR and provide some feedback. I copied all of your concerns here and responded to them accordingly. Please let me know if you have any further questions! 1. Have you considered including a section in the Django admin documentation that outlines

Re: Django Admin Shortcuts

2024-05-25 Thread Faisal Mahmood
Hi *Mike Schem, Thank you for reaching out and for your work on adding keyboard shortcuts to the Django admin. This is a valuable feature that can greatly enhance productivity for many users. We appreciate your contribution and the effort you've put into this PR. We have reviewed your

Django Admin Shortcuts

2024-05-24 Thread Mike Schem
Hey all, I’m seeking some support and feedback on my PR. I’ve added keyboard shortcuts to the Django admin for the save actions. We use it at my company, and it’s pretty helpful for power users. I’d love to hear what the community thinks. https://github.com/django/django/pull/17599 Mike Schem

Re: Admin access

2024-01-23 Thread Boaz Sottie
Check if you have {% csrf_token %} in your form On Tue, Jan 23, 2024, 16:17 Raymond Nsubuga wrote: > I am unable to access my admin site after creating a docker image and > hosting my website. It says an issue about the csrf, anyone who has > encountered the issue can help. >

Admin access

2024-01-23 Thread Raymond Nsubuga
I am unable to access my admin site after creating a docker image and hosting my website. It says an issue about the csrf, anyone who has encountered the issue can help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Disable the admin of "Site"

2024-01-03 Thread 'Thomas Lionel Smets' via Django users
The admin console always displays the admin of "Site" page while this should be hidden for the people on a specific site (they should not be aware of the fact that there are multiple sites) ! When I add the admin.py the following line ``` admin.site.unregister(Site) ``` The (deb

Re: logging admin accesses

2023-12-19 Thread Larry Martell
most certainly can have models and all > of mine always do. > > >> > > >> It is more explicit to do so but more importantly they generally > carry essential real-world information about the relationship itself. > > >> > > >> I haven't look

Re: logging admin accesses

2023-12-19 Thread Mike Dewhirst
I was saying Django's inspectdb will write them for you.M--(Unsigned mail from my phone) Original message From: Larry Martell Date: 20/12/23 00:51 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses On Mon, Dec 18, 2023 at 7:23 PM Mike Dew

Re: logging admin accesses

2023-12-19 Thread Larry Martell
explicitly. >> >> >> -- >> (Unsigned mail from my phone) >> >> >> >> Original message >> From: Larry Martell >> Date: 19/12/23 08:18 (GMT+10:00) >> To: django-users@googlegroups.com >> Subject: Re: loggi

Re: logging admin accesses

2023-12-18 Thread Mike Dewhirst
(Unsigned mail from my phone) Original message From: Larry Martell Date: 19/12/23 08:18 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses django-simple-history is close to what we need. The one issue I see (so far) is tha

Re: logging admin accesses

2023-12-18 Thread Mike Dewhirst
y own but it may well cover m2m tables if you add the models explicitly. --(Unsigned mail from my phone) Original message From: Larry Martell Date: 19/12/23 08:18 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses django-simple-history is close to

Re: logging admin accesses

2023-12-18 Thread Larry Martell
Larry Martell wrote: > > No, I have not see django-simple-history - thanks for the pointer - will > check it out. > > On Fri, Dec 15, 2023 at 9:02 PM Mike Dewhirst wrote: >> >> Just thinking about it again ... you could look at the Admin source to see >> how it

Re: logging admin accesses

2023-12-18 Thread Larry Martell
No, I have not see django-simple-history - thanks for the pointer - will check it out. On Fri, Dec 15, 2023 at 9:02 PM Mike Dewhirst wrote: > Just thinking about it again ... you could look at the Admin source to see > how it is working now and perhaps find a way to include the missing i

Re: logging admin accesses

2023-12-18 Thread Larry Martell
For pages under admin control, yes, we need a full system history. For other tables what we need is more narrowly defined. I have very clear specs on what I need to log. ATM performance is not a concern. On Fri, Dec 15, 2023 at 8:37 PM Mike Dewhirst wrote: > You seem to be asking for a f

Re: logging admin accesses

2023-12-15 Thread Mike Dewhirst
Just thinking about it again ... you could look at the Admin source to see how it is working now and perhaps find a way to include the missing info in a pre-save signal.Also, I found django-simple-history online but I suppose you have seen that already.M--(Unsigned mail from my phone

Re: logging admin accesses

2023-12-15 Thread Mike Dewhirst
You seem to be asking for a full history 'system'. I think the Admin history exists to show a bit of history with a link to go back to the change form where it happened.Full history needs to be specified fairly carefully so it doesn't bog the system down. For example, ever

Re: logging admin accesses

2023-12-15 Thread Larry Martell
On Thu, Dec 14, 2023 at 5:49 PM Mike Dewhirst wrote: > Top posting because of phone email client. > > Have you seen the Admin history? Might be already logged for you. > Thanks, this is useful, but it does not seem to be logging everything. We have a custom user admin page that u

Re: logging admin accesses

2023-12-15 Thread Vitaly Bogomolov
Is that programically accessible? I want to record it in the database. from django.contrib.admin.models import LogEntry logs = LogEntry.objects.all() #or you can filter, etc. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

Re: logging admin accesses

2023-12-14 Thread Larry Martell
On Thu, Dec 14, 2023 at 5:49 PM Mike Dewhirst wrote: > Top posting because of phone email client. > > Have you seen the Admin history? Might be already logged for you. > Is that programically accessible? I want to record it in the database. > Original message ---

RE: logging admin accesses

2023-12-14 Thread Mike Dewhirst
Top posting because of phone email client.Have you seen the Admin history? Might be already logged for you.Mike--(Unsigned mail from my phone) Original message From: Larry Martell Date: 15/12/23 06:44 (GMT+10:00) To: django-users@googlegroups.com Subject: logging admin

logging admin accesses

2023-12-14 Thread Larry Martell
Is there a way to capture all admin changes (add, change, delete). I have some middleware that gets called on any admin add, change, or delete, but I have not figured out a way to capture specifically what was done, something like: model, PK, action, e.g. user, 12, change, first name changed user

Wrong ordering of many-to-many fields with explicit intermediary model in Django admin

2023-11-01 Thread Alan Evangelista
Hi, all. I have a Submission model with a many-to-many relationship with a Market model and explicitly defined a SubmissionMarket model as intermediary model. I have defined Submission inlines in a ModelAdmin class (used by Django admin) and defined the markets field as the first one in the

Django 0.97 filter for admin dashboard

2023-09-04 Thread Israr Hussain Rao
ilter for the admin panel and the django version 0.97 does not have admins.py and I am unable to find documentation of 0.97 version. does anybody have idea *how can i create filter on admin panel on django version 0.97* *regards* -- You received this message because you are subscribed to the G

Django Admin Dropdown Filtering: Show Exam Class Related Students in Student Assign Field

2023-09-01 Thread Sabbir Hasan Munna
https://stackoverflow.com/q/77018469/9885741 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion o

Re: Recover admin username and password

2023-08-03 Thread Maghav Ahuja
You can create another superuser from cmd. Use the command: django-admin createsuperuser name_of_the_user After creating, login from the new user and reset the passwords On Thursday, August 3, 2023 at 7:56:23 PM UTC+12 Safaet Jaman wrote: > I've delete my user admin. I've another t

Re: Recover admin username and password

2023-08-03 Thread Safaet Jaman
Thank you! it worked On Thursday, August 3, 2023 at 2:21:52 PM UTC+6 wongX Ndeso wrote: > Just login to your server, activate the environment and run > createsuperuser to create new superuser account > > On Thu, Aug 3, 2023, 14:56 Safaet Jaman wrote: > >> I've

Re: Recover admin username and password

2023-08-03 Thread wongX Ndeso
Just login to your server, activate the environment and run createsuperuser to create new superuser account On Thu, Aug 3, 2023, 14:56 Safaet Jaman wrote: > I've delete my user admin. I've another two user but i can't login django > admin pannel to use these. [image: Scree

Recover admin username and password

2023-08-03 Thread Safaet Jaman
I've delete my user admin. I've another two user but i can't login django admin pannel to use these. [image: Screenshot from 2023-08-03 13-55-22.png] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

pub_date field is not visible in admin panel, even after configuring the app made migrations i tried every way possible from my side

2023-05-31 Thread Likhith K.P.
from django.db import models # Create your models here. class Question(models.Model): question_text = models.CharField(max_length = 500) pub_date = models.DateTimeField(auto_now_add = True) def __str__(self): return self.question_text class Choice(models.Model): question

Re: i am getting this error when i try to search in admin panel

2023-05-18 Thread Brian Gitau
for the updated search_fields to work correctly. On Thu, May 18, 2023 at 2:01 PM Ravindra Magar wrote: > i am getting this error when i try to search in admin panel > > FieldError at /admin/school/center/ > Unsupported lookup 'icontains' for ForeignKey or join o

i am getting this error when i try to search in admin panel

2023-05-18 Thread Ravindra Magar
i am getting this error when i try to search in admin panel FieldError at /admin/school/center/ Unsupported lookup 'icontains' for ForeignKey or join on the field not permitted. admin.py @admin.register(Center) class CenterAdmin(ImportExportModelAdmin, admin.ModelAdmin): list_disp

Re: Admin

2023-05-05 Thread Flavio Munita
Hi Omkkar, Thank you very much, I have already solved the problem. Best regards, Flavio On Friday, May 5, 2023 at 1:57:28 PM UTC-3 Omkkar Potddar wrote: > Are you create super user.. And register your model in admin.. Please > check first > > On Fri, 5 May, 2023, 10:18 pm F

Re: Admin

2023-05-05 Thread Omkkar Potddar
Are you create super user.. And register your model in admin.. Please check first On Fri, 5 May, 2023, 10:18 pm Flavio Munita, wrote: > Hi, I'm new to django, maybe my question is stupid, but I can't find how > to do it. I have the following: > > app lineasinv &

Admin

2023-05-05 Thread Flavio Munita
e = models.IntegerField(choices=_STATES, default=0) class Meta: ordering = ['user'] def __str__(self): return str(self.user) Lineasinv admin.py contains the following from django.contrib import admin from django.contrib.auth import get_user_model from use

Overriding the default django admin panel with a fully customized Rest Framework + React Dashboard

2023-04-15 Thread Kimanxo
Hello Devs, I Wish you're doing okay . Im currently working on a Blood Analysis Lab related project, the project should provide basic website description and CRUD functionalities concerning the blood exams, their status, ... Basically, I have a custom design for the admin panel wher

Re: Django Admin does not use `get_FOO_display`

2023-04-05 Thread Opeoluwa Fatunmbi
The reason why your overridden get_status_display method is not being applied in the Django admin is because the admin's display_for_field function uses the flatchoices attribute of the field to retrieve the display value of the field's current value. The flatchoices attribute is a l

Django Admin does not use `get_FOO_display`

2023-04-04 Thread 'Ibrahim Abou Elenein' via Django users
I had a model having a field that uses Choices status = FSMField(default=STATUSES.PENDING, choices=STATUSES, protected=True) I did override the `get_status_display ` and its effect was not applied in the Django admin I looked up Django code and found ``` def display_for_field(value

Re: Django Admin

2023-03-24 Thread Jd Mehra
ECURE_CONTENT_TYPE_NOSNIFF = True >>> SECURE_FRAME_DENY = True >>> SECURE_HSTS_SECONDS = 2592000 >>> SECURE_HSTS_INCLUDE_SUBDOMAINS = True >>> SECURE_HSTS_PRELOAD = True >>> X_FRAME_OPTIONS = 'SAMEORIGIN' >>> SECURE_REFERRER_POLICY = &

Re: Django Admin

2023-03-23 Thread Ikrombek
= True >> SECURE_HSTS_SECONDS = 2592000 >> SECURE_HSTS_INCLUDE_SUBDOMAINS = True >> SECURE_HSTS_PRELOAD = True >> X_FRAME_OPTIONS = 'SAMEORIGIN' >> SECURE_REFERRER_POLICY = 'same-origin >> >> On Saturday, March 11, 2023 at 7:04:40 PM UTC+1 James Hu

Clickable link in django admin Panel

2023-03-22 Thread Gurami Tchumburidze
I have problem to display clickable link in django admin panel next to 'icon' field or add help_text witch will be clickable and if i click on it, it must open this 'https://fonts.google.com/icons?icon.set=Material+Icons' website in new window of browther . [image: 111

Re: Django Admin

2023-03-13 Thread Muhammad Juwaini Abdul Rahman
SUBDOMAINS = True > SECURE_HSTS_PRELOAD = True > X_FRAME_OPTIONS = 'SAMEORIGIN' > SECURE_REFERRER_POLICY = 'same-origin > > On Saturday, March 11, 2023 at 7:04:40 PM UTC+1 James Hunt wrote: > >> Hi there. I am fairly new to Django but have had previous success

Re: Django Admin

2023-03-13 Thread Prosper Lekia
s success with > creating an app and being able to access the Admin page. > Recently, if I attempt to access the admin page of a new Django app it > throws the CSRF error upon trying to log in!!! > > I have attempted several ways to bypass this error including adding > allowed hos

Re: Django Admin

2023-03-13 Thread Starnford Chirwa
and being able to access the Admin page. >> Recently, if I attempt to access the admin page of a new Django app it >> throws the CSRF error upon trying to log in!!! >> >> I have attempted several ways to bypass this error including adding >> allowed hosts but I cant

Re: Django Admin

2023-03-13 Thread Sandip Bhattacharya
> On Mar 13, 2023, at 5:14 AM, James Hunt wrote: > > I have yet to create a HTML page so I'm not sure that the inclusion of {% > csrf_token %} is required. I mean it's just the admin page I am trying to > access which is provided by Django and not a page create

Re: Django Admin

2023-03-13 Thread Paul Kudla
RUSTED_ORIGIN = ('') On Sun, 12 Mar 2023 at 02:04, James Hunt <mailto:newbypass...@gmail.com>> wrote: Hi there. I am fairly new to Django but have had previous success with creating an app and being able to access the Admin page. Recently, if I attempt to access the

Re: Django Admin

2023-03-13 Thread James Hunt
Hi there. I have yet to add a login/register page since I am only trying to access the admin page which is a part of the Django project setup. So in effect, there are no HTML pages setup and I cant access the Django admin page layout as this is an integral part of Django!!! This is the problem

Re: Django Admin

2023-03-13 Thread Andrew Romany
en %} is required. I mean it's just the admin page I am trying to > access which is provided by Django and not a page created by me!!! > > I am very surprised there is no fix for this issue!!! I might need to > abandon Django and move a different framework given that this issue is at &

Re: Django Admin

2023-03-13 Thread James Hunt
I have yet to create a HTML page so I'm not sure that the inclusion of {% csrf_token %} is required. I mean it's just the admin page I am trying to access which is provided by Django and not a page created by me!!! I am very surprised there is no fix for this issue!!! I might need t

Re: Django Admin

2023-03-12 Thread Mir Junaid
ing able to access the Admin page. > Recently, if I attempt to access the admin page of a new Django app it > throws the CSRF error upon trying to log in!!! > > I have attempted several ways to bypass this error including adding > allowed hosts but I cant seem to get past this iss

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2023-03-12 Thread Amar Zamoum
I just had the same problem, and i realized that i had the templates file in the wrong "mysite" folder. It is easy to confuse the two, so for whoever has the same problem, just check where exactly you have put the "template/admin" folders, because in the tutorial it sa

Re: Django Admin

2023-03-12 Thread James Hunt
I did add this but no change!!! Just keep getting that CSRF token error when trying to access admin!! Which is strange as the CSRF token is predominantly for POST methods. # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] CSRF_TRUSTED_O

Re: Django Admin

2023-03-12 Thread Muhammad Juwaini Abdul Rahman
Have you tried my suggestion? On Sun, 12 Mar 2023 at 20:32, James Hunt wrote: > I have literally set this up today just to prove that it happens for every > Django project setup!!! > > So this is my settings : > > > """ > Django settings for DjangoTest

Re: Django Admin

2023-03-12 Thread James Hunt
I have literally set this up today just to prove that it happens for every Django project setup!!! So this is my settings : """ Django settings for DjangoTest project. Generated by 'django-admin startproject' using Django 4.1.7. For more informatio

Re: Django Admin

2023-03-12 Thread Muhammad Juwaini Abdul Rahman
I think you need to add the following in settings.py: CSRF_TRUSTED_ORIGIN = ('') On Sun, 12 Mar 2023 at 02:04, James Hunt wrote: > Hi there. I am fairly new to Django but have had previous success with > creating an app and being able to access the Admin page. > Recent

Re: Django Admin

2023-03-11 Thread Letlaka Tsotetsi
Please share your code so we can be able to assist you On Sat, 11 Mar 2023 at 8:04 PM, James Hunt wrote: > Hi there. I am fairly new to Django but have had previous success with > creating an app and being able to access the Admin page. > Recently, if I attempt to access the admin page

Re: Django Admin

2023-03-11 Thread Victor Matthew
Show your cold pleased On Sat, 11 Mar 2023, 7:04 pm James Hunt, wrote: > Hi there. I am fairly new to Django but have had previous success with > creating an app and being able to access the Admin page. > Recently, if I attempt to access the admin page of a new Django app it > thr

Re: Django Admin

2023-03-11 Thread Obam Olohu
Hello there, you can send a meeting link, I’ll fix the issue for you Sent from my iPhone > On 11 Mar 2023, at 12:31 PM, James Hunt wrote: > > Hi there. I am fairly new to Django but have had previous success with > creating an app and being able to access the Admin page. >

Re: Django Admin

2023-03-11 Thread Balogun Awwal
cess with > creating an app and being able to access the Admin page. > Recently, if I attempt to access the admin page of a new Django app it throws > the CSRF error upon trying to log in!!! > > I have attempted several ways to bypass this error including adding allowed > hosts but I

Django Admin

2023-03-11 Thread James Hunt
Hi there. I am fairly new to Django but have had previous success with creating an app and being able to access the Admin page. Recently, if I attempt to access the admin page of a new Django app it throws the CSRF error upon trying to log in!!! I have attempted several ways to bypass this

Re: Django v3.2 broken admin interface due to malicious JSON value

2023-03-09 Thread 'Johannes Filter' via Django users
n 8/03/2023 7:49 am, hi via Django users wrote: > > Hello everybody, > > I’ve used a fuzzer on my Django v3.2 project that resulted in a broken > admin interface. I’m not sure whether this is a bug or a rough edge case. > > I’m using Python 3.9.13 with Django 3.2.18 with Post

Django v3.2 broken admin interface due to malicious JSON value

2023-03-07 Thread hi via Django users
Hello everybody, I’ve used a fuzzer on my Django v3.2 project that resulted in a broken admin interface. I’m not sure whether this is a bug or a rough edge case. I’m using Python 3.9.13 with Django 3.2.18 with Postgres. I have a Model with a JSONField and also added the model to my admin view

RE: ERROR DURING VIEWING SITE PART OF ADMIN

2023-02-21 Thread outlaw 2paczy
kindly help me to solve this error please -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on t

Django admin only one group per user

2023-02-15 Thread Joao Frankmann
I am creating a customised Django Admin and I want to restrict users to be associated to no more than one group. I am using Django 4.1 and Python 3.11 admin.py: ``` from django.contrib import admin from typing import Set from django.contrib.auth.models import User from

Re: Admin foreign key widgets Dont quote Keys that the unicode of the Primary key (value=number) is a special character.

2023-02-13 Thread Dev Femi Badmus
https://chat.whatsapp.com/IVvrrF9Wq7OHWk5x4XNk9K On Wed, Feb 8, 2023 at 3:40 PM Oluwayemisi Ismail < ismailoluwayem...@gmail.com> wrote: > Hello everyone, > > I'm Working on a ticket, "Admin Foreign Key widgets don't quote keys". > When I reproduce the

Re: Admin validation activated just once after final call to save_model()

2023-01-18 Thread David Wallace
rough. I recommend solutions > at three levels: > > 1. The UI - Make it more intuitive for the race admins to rank the > results. Rather than give them an integer input field, use something like > django-admin-sortable2[b] to allow the race admin to drag-n-drop to reorder > the re

Ticket #34043: Contributing to the admin UI

2023-01-17 Thread Ritesh Kumar Maurya
I would like to work on this issue. Can someone help choose a good admin UI and add it to the Django project? Details here: #34043 (Doc "Writing your first patch for Django" doesn't explain how to contribute to the admin UI) – Django (djangoproject.com) <https://code.django

Admin validation activated just once after final call to save_model()

2023-01-15 Thread David Wallace
I am attempting to modify a page on my Django admin so that a trusted race administrator can manually rearrange a leader board of race results. The results go from 1 to N competitors in a race, and are mutually exclusive. Draw results are not allowed, so race administrators apply often complex

Re: any solutions guys on the ERROR admin E108 on list_display[2] attributes not callable

2023-01-10 Thread ASAMOAH EMMANUEL
Product class to return the stock, then add it to list_display. On Tue, Jan 10, 2023 at 9:23 PM David Nugent wrote: > This is due to an error in your admin class (ProductAdmin in this case) > > The error message points directly where and what you need to check > (spoiler: list_displ

Re: any solutions guys on the ERROR admin E108 on list_display[2] attributes not callable

2023-01-10 Thread David Nugent
This is due to an error in your admin class (ProductAdmin in this case) The error message points directly where and what you need to check (spoiler: list_display item, 3rd field “stock”, which is incorrect). -- Original Message -- From "E Mollz" To "Django users&q

Re: any solutions guys on the ERROR admin E108 on list_display[2] attributes not callable

2023-01-10 Thread 'Kasper Laudrup' via Django users
On 10/01/2023 12.53, E Mollz wrote: : (admin.E108) The value of 'list_display[2]' refers to 'stock', which is not a callable, an attribute of 'ProductAdmin', or an attribute or method on 'products.Product'. Unfortunately you've run into one of the issues modern science has not yet been abl

any solutions guys on the ERROR admin E108 on list_display[2] attributes not callable

2023-01-10 Thread E Mollz
: (admin.E108) The value of 'list_display[2]' refers to 'stock', which is not a callable, an attribute of 'ProductAdmin', or an attribute or method on 'products.Product'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Permission for admin to add patient

2022-12-26 Thread Karel Curtis
Thank you for helping. Le dim. 18 déc. 2022 à 00:58, sere kaba a écrit : > from .model import Patient > admin.site.register(Patient) > or > @admin.register(Patient) > > Le mardi 13 décembre 2022 à 13:02:28 UTC, abdur.r...@gmail.com a écrit : > >> Are you want to r

Re: Permission for admin to add patient

2022-12-17 Thread sere kaba
from .model import Patient admin.site.register(Patient) or @admin.register(Patient) Le mardi 13 décembre 2022 à 13:02:28 UTC, abdur.r...@gmail.com a écrit : > Are you want to register your model on admin? > > On Tuesday, December 13, 2022 at 1:01:17 PM UTC+6 manjushak...@gmail.com

Re: Permission for admin to add patient

2022-12-13 Thread Abdur Rahim
Are you want to register your model on admin? On Tuesday, December 13, 2022 at 1:01:17 PM UTC+6 manjushak...@gmail.com wrote: > Hi, need to register the model.py file in admin.py file and then make > migrations as like mention in following documentation. > https://docs.djangoproject.c

Re: Permission for admin to add patient

2022-12-12 Thread André Hangalo
from .models import ModelName admin.site.register(ModelName) On Tue, 13/12/2022 at 08:04 Manjusha wrote: > I'm junior may it will work!! > > On Tuesday, December 13, 2022 at 12:31:17 PM UTC+5:30 Manjusha wrote: > >> Hi, need to register the model.py file in admin.py file and then make >> migrat

Re: Permission for admin to add patient

2022-12-12 Thread rahul sharma
connect with me in zoom On Tue, Dec 13, 2022 at 12:34 PM Manjusha wrote: > I'm junior may it will work!! > > On Tuesday, December 13, 2022 at 12:31:17 PM UTC+5:30 Manjusha wrote: > >> Hi, need to register the model.py file in admin.py file and then make >> migrations as like mention in following

Re: Permission for admin to add patient

2022-12-12 Thread Manjusha
I'm junior may it will work!! On Tuesday, December 13, 2022 at 12:31:17 PM UTC+5:30 Manjusha wrote: > Hi, need to register the model.py file in admin.py file and then make > migrations as like mention in following documentation. > https://docs.djangoproject.com/en/4.1/intro/tutorial02/ > > On Mo

Re: Permission for admin to add patient

2022-12-12 Thread Manjusha
Hi, need to register the model.py file in admin.py file and then make migrations as like mention in following documentation. https://docs.djangoproject.com/en/4.1/intro/tutorial02/ On Monday, December 12, 2022 at 4:49:26 AM UTC+5:30 curtis...@gmail.com wrote: > Hello to all. Please, I would lik

Re: Django call_command from Admin

2022-10-25 Thread Aziz Mek
Hi Mike, Many thanks for the heads and up and confirmation that it can be done, much appreciated Kind regards Aziz On Wednesday, October 26, 2022 at 12:16:00 AM UTC+1 mikeol...@open4businessonline.com wrote: > Aziz, > > I had a similar need and I created my own middleware that checked the >

Re: Django call_command from Admin

2022-10-25 Thread Mike Oliver
Aziz, I had a similar need and I created my own middleware that checked the request path and did the call when I got a match. See https://docs.djangoproject.com/en/4.1/ref/middleware/ *Mike Oliver** Founder**, Open 4 Business Online* Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462 US Toll f

Re: Django call_command from Admin

2022-10-25 Thread Aziz Mek
Thank you Mdehs, Much appreciated for the advice, I try to avoid signals as they are thread huggers but maybe i will or try to circumvent them somehow Kind regards Aziz On Friday, October 21, 2022 at 7:32:02 PM UTC+1 mdehs...@gmail.com wrote: > Please refer the signal concept in django you wi

Re: Django call_command from Admin

2022-10-25 Thread Aziz Mek
; process stuff along the way. > > you will need to modify this example but it's how i update info when > saving an scom email user for dovecot. > > you can also override the admin class as well with something simaliar > > Note : > super(EmailUsers, self).save(*args, **

Re: how to show liste filtre admin django ManyToOne Please

2022-10-24 Thread Alen Zuvic
Ok pon, 24. lis 2022. 12:03 AMINE AZIZ je napisao: > how to show liste filtre admin django ManyToOne in this case : > > > > [image: Sans titre 9.jpg] > > > How can i filtre in Project by tasks and specialy by Personne > > liste dropdown of personne and show m

Re: Django call_command from Admin

2022-10-24 Thread Paul Kudla
example for admin.py def save_model(self, request, obj, form, change): #This will save create #Check to see if this will be an invoice copy copy = False current_invoice = obj.invoice_number if obj.new_invoice : #clear the flag and save t

Re: Django call_command from Admin

2022-10-24 Thread Paul Kudla
you need to basically add a hook (save class) to your save model and process stuff along the way. you will need to modify this example but it's how i update info when saving an scom email user for dovecot. you can also override the admin class as well with something simaliar Note :

how to show liste filtre admin django ManyToOne Please

2022-10-24 Thread AMINE AZIZ
how to show liste filtre admin django ManyToOne in this case : [image: Sans titre 9.jpg] How can i filtre in Project by tasks and specialy by Personne liste dropdown of personne and show me liste of projects ? best ragards -- You received this message because you are subscribed to the

how to show liste filtre admin django ManyToOne

2022-10-24 Thread AMINE AZIZ
how to show liste filtre admin django ManyToOne in this case : in models.py --- class Personne(models.Model): name= models.CharField(max_length=50,blank=False) def __str__(self): return self.name class Project(models.Model): title= models.CharField(max_length=50,blank=False) note

Re: Django call_command from Admin

2022-10-21 Thread Mohammad Ehsan Ansari
Please refer the signal concept in django you will get how to implement it On Thu, 20 Oct, 2022, 9:36 pm Aziz Mek, wrote: > Hi All, > > I was wondering if you have come across the following: > > I have a field in the model that's empty, when the user fills it up and > clicks Save, it > should t

Re: Django call_command from Admin

2022-10-21 Thread Mohammed Mohamed
Hello there Aziz, are you a beginner in Python? I'm one. Could we make some Google meet arrangements so that I can learn from you. On Thursday, 20 October 2022 at 19:17:41 UTC+3 azi...@gmail.com wrote: > Hi > > Thank you very much for the swift response and for the link, much > appreciated. >

Re: Django call_command from Admin

2022-10-20 Thread Muhammad Juwaini Abdul Rahman
https://docs.djangoproject.com/en/4.1/ref/django-admin/#running-management-commands-from-your-code I think it's quite straightforward. Just add call_command(command) after (or before the save() line) in your code. Depending on whether you're using FBV or CBV, you need to pinpoint whe

Re: Django call_command from Admin

2022-10-20 Thread Aziz Mek
Hi Tega, Nice to meet you and apologies for the delay in getting back to you, Signals are both the best and worst. Yes, they'd "solve" this problem. Though so would overriding the model's save method or the admin's save method. But the issue I find with them is that because they are decouple

Re: Django call_command from Admin

2022-10-20 Thread Tega Ukavwe
The name's Tega, If I may ask you, what makes you favour making a management command as opposed to creating a simple post_save signal in your present situation. >From the django documentation, post_save is literally called on every save, something similar to the Publisher Subscriber pattern. I'd

Re: Django call_command from Admin

2022-10-20 Thread Aziz Mek
Hi Thank you very much for the swift response and for the link, much appreciated. I did have a look at that article this morning but it is using signals which will only add one more layer to my stack and i think essentially does what call_command will do anyway. I really appreciate your resp

Re: Django call_command from Admin

2022-10-20 Thread Tega Ukavwe
Do a little read up on post_save signal. Below is a link to a good start point for you: https://simpleisbetterthancomplex.com/tutorial/2016/07/28/how-to-create-django-signals.html I hope this helps you in your search. Best Wishes Aziz. On Thu, Oct 20, 2022 at 5:06 PM Aziz Mek wrote: > Hi All,

Django call_command from Admin

2022-10-20 Thread Aziz Mek
Hi All, I was wondering if you have come across the following: I have a field in the model that's empty, when the user fills it up and clicks Save, it should trigger/call a management Command (This command is already build that sends emails ), Django docs say i can use call_command but not sur

Re: my admin django not correct: NoReverseMatch à /admin/login/

2022-09-29 Thread Muhammad Juwaini Abdul Rahman
There's no 'index' in your urls.py. On Tue, 20 Sept 2022 at 21:38, Nicodem Laurore wrote: > Hello guys, > I no longer have access to my Django admin, this in all my projects, I > know what I did to get there, but getting out would be fine in order to > continue my pr

my admin django not correct: NoReverseMatch à /admin/login/

2022-09-20 Thread Nicodem Laurore
Hello guys, I no longer have access to my Django admin, this in all my projects, I know what I did to get there, but getting out would be fine in order to continue my projects, if you know any way to handle this, it would be good for me, thank you Environment: Request Method: GET Request

  1   2   3   4   5   6   7   8   9   10   >