How to trigger system check while running development server?

25 views
Skip to first unread message

One Above All

unread,
Feb 27, 2020, 9:31:00 AM2/27/20
to Django users
I am updating a settings in my test which should raise exception on illegal entries, but merely updating settings does not make django perform system checks. Is there any method which I can call to trigger those checks? 

Integr@te System

unread,
Feb 27, 2020, 2:28:32 PM2/27/20
to django...@googlegroups.com
Hi Fr,

If you have not yet found out module/method for you, so let try git action as on your dev phase with git repo.

On Thu, Feb 27, 2020, 21:32 One Above All <the.one.abo...@gmail.com> wrote:
I am updating a settings in my test which should raise exception on illegal entries, but merely updating settings does not make django perform system checks. Is there any method which I can call to trigger those checks? 

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7e9b4e35-0b4a-4c2b-864a-8631ff83ac8b%40googlegroups.com.

Mike Dewhirst

unread,
Feb 27, 2020, 6:14:33 PM2/27/20
to django...@googlegroups.com
https://docs.djangoproject.com/en/2.2/topics/settings/#using-settings-without-setting-django-settings-module

Look at the configure() method. In particular, you might want to save
one or more settings values, change them for some of the tests and then
switch them back. I would probably isolate such tests in a separate
module and use the setUP and tearDown methods to fix the adjusted settings.

Good luck

Mike

> --
> 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...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> <https://groups.google.com/d/msgid/django-users/7e9b4e35-0b4a-4c2b-864a-8631ff83ac8b%40googlegroups.com?utm_medium=email&utm_source=footer>.

Naveen Arora

unread,
Feb 28, 2020, 7:27:33 AM2/28/20
to Django users
can you explain more with some code, the exact question .?

Cheers,
Naveen Arora

One Above All

unread,
Mar 4, 2020, 12:51:13 PM3/4/20
to django...@googlegroups.com
Greetings, 

Using configure() didn't helped me much. I implemented settings validation checks by extending system checks and called that validation check function in tests. This does not required me to make Django Sever perform system checks again,

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6f03d383-ba0a-4af8-b4b1-61b1b8b496cf%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages