Re: Using {% include %} and getting context with me

2019-02-13 Thread Mikkel Kromann
Bah! I should really read the docs more carefully. >From the docs: "*Include:* *Loads a template and renders it with the current context.*" https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#include The example I posted actually works perfectly fine with regards to the include. I ju

Is there a package for user-tagging and user-properties?

2019-02-13 Thread Charles Thayer
I'm aware of django-taggit (and similar) but I'm wondering if there's a package for tagging Users with properties that have values of different types, such as strings, ints, datetimes, etc. For example, one might tag a user with "power-user", add a property for "last-visited-on" as datetime(20

Re: Messages rejected?

2019-02-13 Thread Anton Melser
Thanks for the reply. I thought there might be a moderation queue (I never made it as far as the dedicate list docs). I would be quite interested in finding out what was inappropriate about my first attempt at posting and what changed so that my second attempt (with a different email) was acceptabl

Re: Create a Celery task with Django

2019-02-13 Thread Luis Zárate
See http://django.pyexcel.org/en/latest/ Clean code could be made with this library. El miércoles, 13 de febrero de 2019, valentin jungbluth < valentin.a...@gmail.com> escribió: > Thank you Andréas ! > > I understand your comment, but it could be possible to illustrate it with my code ? I spent 1

Re: Create a Celery task with Django

2019-02-13 Thread Luis Zárate
As Andreas suggest I try to create a function that receive a file object and save the excel content there, Django response works like a file so when you have a less than 7 then pass the http response and change the headers. With celery you can store your firters on str as json file and pass to

Error- django.core.exceptions.ImproperlyConfigured

2019-02-13 Thread Aayush Aggarwal
Hi all, I am using django-warrant(https://github.com/MetaMetricsInc/django-warrant) as my Authentication backend and using the django_warrant.UserObj as the User Model.When i try to run "python manage.py makemigrations" . I got this "django.core.exceptions.ImproperlyConfigured" error. I have cr

Re: Messages rejected?

2019-02-13 Thread Tim Graham
Messages from first time posters go through a moderation queue. On Tuesday, February 12, 2019 at 9:56:26 PM UTC-5, Anton Melser wrote: > > Hi, > I asked a question last night with a Google for business account and had > the message bounce - is that normal? > > Google also hasn't kept the message

Re: Create a Celery task with Django

2019-02-13 Thread valentin jungbluth
Thank you Andréas ! I understand your comment, but it could be possible to illustrate it with my code ? I spent 1 week and up to now I don't find any way to solve my issue and execute my Celery task :/ -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Create a Celery task with Django

2019-02-13 Thread C. Kirby
Not directly relevant to your celery question, but I would like to point you to a project of mine - https://django-modelqueryform.readthedocs.io/en/latest/ It lets you build search form that generates complex Q objects. It would replace a lot of you GET field checking and filtering on that view

Re: Using {% include %} and getting context with me

2019-02-13 Thread Avraham Serour
Maybe you can solve this using a templatetag? On Wed, 13 Feb 2019, 16:47 Mikkel Kromann Hi. > > I have a collection of apps where I find repeating myself when rendering > tables in the templates. > In the stylised example below I have three types of tables, foo, bar and > baz. > Each app is suppo

Using {% include %} and getting context with me

2019-02-13 Thread Mikkel Kromann
Hi. I have a collection of apps where I find repeating myself when rendering tables in the templates. In the stylised example below I have three types of tables, foo, bar and baz. Each app is supposed to render various combinations of tables from its own models, but also from other models' tabl

Re: Create a Celery task with Django

2019-02-13 Thread Andréas Kühne
Hi, FIrst of all - try to put all the code that is the same for both calls into one method. This way you won't get any problems with that in the future when you need to update the produced excel file. You can actually use the same method in both cases because if you call the method WITHOUT delay()

Re: update object without updating auto_now fields

2019-02-13 Thread Андрей Маслов
MyModel.objects.filter(pk=obj.pk).update(...) https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.DateField.auto_now The field is only automatically updated when calling Model.save() .

Create a Celery task with Django

2019-02-13 Thread valentin jungbluth
Hello guys, I'm working on my Django project and I need to integrate Celery to do something. I'm using Django 1.11.20. *My context :* I have a template page with a search form. Once you did a search, it returns a table with search results. It's possible to export to .xls format with/without se

Re: Passing values

2019-02-13 Thread Ivan Martić
In first page(form), i want to search for vendor. Afterwords when i click on one we go into another page. On this page we have performance form where we need to give ratings from 1 to 5 for that particular vendor. So when I rate all the fields and press save, i want to store all rating data in sql

Re: Passing values

2019-02-13 Thread Mohammad Etemaddar
Dear Ivan, If I get you right, You have a page with form, and you want to post it to another page. so, fill the "action" part of html form with the second page's url. Also the timezone.now is allways available in any python file you are working on it, and also request and request.user What do

Passing values

2019-02-13 Thread Ivan Martić
Hi all, where can i find more info regarding passing values in views/forms/url. What I need is to pass value from form in previous url page to the form in next url page(also prefilling with data like timezone.now, request,user) Thank you in advance. Ivan -- You received this message because yo

Re: Keeping/accessing the data Django generates during a test run

2019-02-13 Thread Anton Melser
> > When you use django unittests commit is made as no-op. Use --keepdb and at > the end of your tests run SQL commit against your database cursor > connection. > Awesome, exactly the info I was missing. Thanks for your help. Cheers, Anton -- You received this message because you are subscribed

Re: Keeping/accessing the data Django generates during a test run

2019-02-13 Thread Jani Tiainen
When you use django unittests commit is made as no-op. Use --keepdb and at the end of your tests run SQL commit against your database cursor connection. On Wed, Feb 13, 2019 at 5:54 AM Anton Melser wrote: > Hi, > > I can't work out whether it is expected or whether I am missing something. > I wo

update object without updating auto_now fields

2019-02-13 Thread Mohammad Etemaddar
I think about times that I need to edit user profiles without touching auto_now field. How can I do it? -- 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-u