Re: Writing a custome Django Log Formatter.

2017-01-23 Thread Arun S
Hi, Thanks, I did this. But this applies to all the Modules in the Project. Basically my issue is when Django is running with Celery and there are more no of workers, the Logs needs to be diffrentiatied and also not for all the Modules of the project. So in order to apply for a particular

Writing a custome Django Log Formatter.

2017-01-23 Thread Arun S
Hi all, I have a small issue with writing a Custom Log Formatter. By default: log_format = '%(asctime)s %(module)s %(levelname)-8s- %(message)s' This is the Log formatter being used. But only in a few cases or rather in a few modules, i would like to include for ex: "some_id" as a seperator

Re: Writing a custome Django Log Formatter.

2017-01-23 Thread Александр Христюхин (roboslone)
Hi, yes, it's absolutely possible. Refer to Django docs about logging (https://docs.djangoproject.com/en/1.10/topics/logging/ ) and logging docs (https://docs.python.org/3/library/logging.config.html#logging-config-dictschema

Re: dear django users & fans.. i really need ur help ok

2017-01-23 Thread ludovic coues
Computer based assessment can be all kind of thing but django should get you a long way. >From what I understand, what you need is mainly handling html form and django provide some great tools to do just that. If you need to do assessment on, say, reaction time, you might need to spend some time

Re: Writing a custome Django Log Formatter.

2017-01-23 Thread Александр Христюхин (roboslone)
Filter applies to handlers, as you can see from my example. So what you need is a custom handler for loggers that require that some_id of yours. > On 23 Jan 2017, at 13:04, Arun S wrote: > > Hi, > > Thanks, I did this. But this applies to all the Modules in the Project. >

Re: audit trail functionality in database model

2017-01-23 Thread Melvyn Sopacua
On Saturday 21 January 2017 04:15:34 enrico baranski wrote: > I'm quite new to Django and currently experimenting with the database > model. Defining fields appears to be quite intuitive and is well > described in the documentation. However, I am looking into audit > trail functionalities.

Multiple forms in the same template

2017-01-23 Thread schaf . mh
HI All, I'm new in Django and in Web-Development. Therefore I'm a little confused now. I have taken over a Django project and first I want to upgrade it to the actual version. Now I was doing the migration to Django 1.9.12 and struggling with the following problem: Using ModelFormMixin (base

Re: Django and timezones ... how to initialize a field to now() in the in clients time zone?

2017-01-23 Thread 'Tom Evans' via Django users
On Sat, Jan 21, 2017 at 9:40 AM, Bernd Wechner wrote: > I have a model with this field: > > date_time = models.DateTimeField(default=timezone.now) > > if I look at the generic create form, it inializes the date_time field with > now in UTC, not in local time. > > Now I

Re: Multiple forms in the same template

2017-01-23 Thread schaf . mh
Hi! And thanks for the answer. > > This stopped working in Django 1.8 > : > > "Class-based views that use ModelFormMixin will raise an > ImproperlyConfigured exception when both the fields and form_class > attributes are

Re: Geodjango layermapping utility

2017-01-23 Thread jbanting
It seems like layermapping.py is not seeing the data as an instance of six.string_types and therefore doesn't build a GDAL Datasource from it. Line 92-96 of contrib\gis\utils\layermaping.py if isinstance(data, six.string_types): self.ds = DataSource(data, encoding=encoding) else: self.ds =

Re: Geodjango layermapping utility

2017-01-23 Thread jbanting
Replacing lines 92-96 in layermapping.py with if isinstance(data[0], six.string_types): self.ds = DataSource(data[0], encoding=encoding) else: self.ds = data self.layer = self.ds[layer] worked for me. -- You received this message because you are subscribed to the Google Groups

Re: Multiple forms in the same template

2017-01-23 Thread Melvyn Sopacua
On Monday 23 January 2017 06:41:53 schaf...@gmail.com wrote: > This worked well like that until Django 1.8, but now with Django 1.9 This stopped working in Django 1.8[1] : "Class-based views that use ModelFormMixin will raise an ImproperlyConfigured exception when both the fields and form_class

Re: Unclear Debug Message (Bug?) When Invalid Url in Extended Template

2017-01-23 Thread Tim Graham
Could you check with Django 1.11a1? This might be fixed in https://code.djangoproject.com/ticket/27584. On Saturday, January 21, 2017 at 6:02:27 PM UTC-5, Connor Boyle wrote: > > I've noticed that when I extend a template that references an invalid url > name, in debug mode, the error message

Re: audit trail functionality in database model

2017-01-23 Thread Ryan Castner
Django Field History is a great project to audit trail a model field On Saturday, January 21, 2017 at 7:19:57 AM UTC-5, enrico baranski wrote: > > Hi all Django users, > > I'm quite new to Django and currently experimenting with the database > model. Defining fields appears to be quite intuitive

Issue with Tutorial pt 5 "Fixing the bug"

2017-01-23 Thread John Wall
Hello all, I am working through the Django tutorial. I've made it to "Fixing the bug" within part 5, but am having issues. The tutorial shows the following lines: def was_published_recently(self): now = timezone.now() return now - datetime.timedelta(days=1) <= self.pub_date <= now to be