Show FK as input instead of drop down in admin

2021-01-27 Thread Kevin Olbrich
Hi! Is it possible to disable fetching of related models for admin pages? I have a field that links to a table containing more than 1M rows which django tries to fetch and build the drop down. For my purpose, it is sufficient if it is a simple input containing the id instead. How can I accompli

Custom forms in Django admin?

2019-04-08 Thread Kevin Olbrich
Hi! Is it possible to add a form to the Django admin? Models are no problem but I have a slightly more complex requirement (still less than a full view with templates, etc.). Kind regards Kevin -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Logging of full trace with Debug set to False

2019-01-29 Thread Kevin Olbrich
Exceptions (broke some things to test it). Thanks for the hint to this excellent tool! Kevin Am Montag, 28. Januar 2019 13:55:29 UTC+1 schrieb Michal Petrucha: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Mon, Jan 28, 2019 at 04:45:44AM -0800, Kevin Olbrich wrote:

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Kevin Olbrich
gfile /home/ubuntu/websitelogs.log > > For more setting options read gunicorn documentation > > https://docs.gunicorn.org/en/stable/settings.html#logging > > On Mon, 28 Jan 2019, 16:50 Michal Petrucha wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA512 &g

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Kevin Olbrich
Hi Michal, looks very promissing. I read the SDK guide for Django and I realy like it. Thank you! Kevin Am Montag, 28. Januar 2019 12:20:35 UTC+1 schrieb Michal Petrucha: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Mon, Jan 28, 2019 at 02:53:55AM -0800, Kevi

Re: Adding default rows to Django admin inlines

2019-01-28 Thread Kevin Olbrich
Hi! Maybe I did not fully understand but it seems we indeed don't talk about the same. I already got M2M relation. If I access the "Jobs" admin-page, I have the option to add inline-options. On a new object, there are no lines but I can add new. I would like to add lines for the attributes from M

Logging of full trace with Debug set to False

2019-01-28 Thread Kevin Olbrich
Hi! I would like to catch and send all exceptions to a logging system. When Debug is set to False, all debug related information is lost (just a HTTP 500 error message). While Debug False works perfectly in production, I would like to log and send the exceptions to a backend, where I can save t

Disable autoescape globally

2019-01-21 Thread Kevin Olbrich
Hi! I am using the template engine to build e-mail templates but the autoescape function breaks quotes. Is it possible to disable autoescape globally or in the render function using a parameter? Thank you. Kevin -- You received this message because you are subscribed to the Google Groups "D

Adding default rows to Django admin inlines

2019-01-18 Thread Kevin Olbrich
Hi! I have a question regarding inlines in the Django admin interface. Currently there are following models: Jobs - holds the Job-ID, an action (FK JobActions) and execution status JobActions - holds a list of possible actions (like "create a new customer") [Also has a ManyToMany against JobAttr

External DB layout, two column as PK, modification not possible

2018-08-01 Thread Kevin Olbrich
Hi! I got the following table definition on inspect db: class KevinExample(models.Model): *code = models.CharField(db_column='Code', primary_key=True, max_length=50) # Field name made lowercase.lineid = models.IntegerField(db_column='LineId') # Field name made lowercase.* object

Re: Default for varbinary in inspectdb

2018-03-20 Thread Kevin Olbrich
PS: After changing the field to BinaryField, read / write works beautiful. Am Dienstag, 20. März 2018 14:49:35 UTC+1 schrieb Kevin Olbrich: > > Hi, > > I just noticed a problem with varbinary fields and inspectdb. > When inspectdb processes all fields, it creates varbinary as Char

Default for varbinary in inspectdb

2018-03-20 Thread Kevin Olbrich
Hi, I just noticed a problem with varbinary fields and inspectdb. When inspectdb processes all fields, it creates varbinary as CharField but it needs to be BinaryField. Using CharField it is impossible to store non-ASCII (non-text) content in these columns. I noticed that problem when I tried t