Re: Django select filter

2017-09-12 Thread Bernd Wechner
Here are a pile of options: https://djangopackages.org/grids/g/auto-complete/ and the winner it seems is: https://djangopackages.org/packages/p/django-autocomplete-light/ Cheers, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django select filter

2017-09-12 Thread sum abiut
I am trying to understand this code. Can someone explain where the current_org came from code taken from stackoverflow {% for org in organisation %} {{org.name|capfirst}} {% endfor %} cheers On Wed,

More bizarre URL behaviour after deploying

2017-09-12 Thread Bernd Wechner
OK, I've more or less solved my original problems in deploying in this space. Well I've deployed and am happy. BUT, I am still bamboozled by something and wonder if anyone has any clue or insights to share? I have these two urlpatterns defined:     url(r'^list/(?P\w+)',

Re: Django select filter

2017-09-12 Thread ADEWALE ADISA
you can make it interesting by using ajax to post the selected month to your view which u ve already written to accept the month variable. use the variable to filter the necessary queryset in your view, then return the response in json format. you can now collect it from your ajax response, use

Re: Django select filter

2017-09-12 Thread Oladipupo Elegbede
I think the filtering should be done in your view. You pass the value of the selected month to the view as a post item. Then do a query based on the view. On Sep 12, 2017 7:43 PM, "sum abiut" wrote: > Hi, > I am working on an app which has a dropdown/select option which

Django select filter

2017-09-12 Thread sum abiut
Hi, I am working on an app which has a dropdown/select option which contain months of the year. What i want to accomplished is when the user click on the drop down and select a particular month of the year the app should display a table filter by that particular selected month. Please point

Re: How to Use gRPC with Protocol buffer with Django

2017-09-12 Thread Raman Prasad
Hi, Did you find an answer to this? I am starting to integrate gRPC communication and I plan to try django channels https://channels.readthedocs.io/en/stable/ Regards On Saturday, June 10, 2017 at 3:14:44 PM UTC-4, kashif Nawaz wrote: > > Hey, I am using Django to make an E-commerce website

Migration Woes: TypeError: int() argument must be a string... on ForeignKeys

2017-09-12 Thread Matthew Pava
I'm trying to alter my foreign keys on my audit log models to allow for null. Django creates a new migration file, with an operation something like below: migrations.AlterField( model_name='checklistauditlogentry', name='usage',

FROM ONLY in Postgres back-end

2017-09-12 Thread Andrew Hankinson
Hello, tl;dr I'm trying to implement 'temporal tables' [0] in Django with a Postgres backend, and I'm stuck on how to generate the appropriate SELECT ... FROM ONLY and UPDATE queries. The temporal tables pattern depends on having two mirror tables. For a simple example, let's call them

Django Models Relationship

2017-09-12 Thread james lin
Hi, I have the following models: class UserPost(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) post = models.ForeignKey(Post, on_delete=models.CASCADE) created = models.DateTimeField(auto_now_add=True) class User(AbstractUser): MALE

Re: Email validation in form

2017-09-12 Thread Moreplavec
I have {{ field.errors }} im my template. I changed model to not contain blank=True, but problem is still the same. Dne úterý 12. září 2017 15:18:58 UTC+2 Daniel Roseman napsal(a): > > > On Tuesday, 12 September 2017 14:18:29 UTC+1, Daniel Roseman wrote: >> >> On Tuesday, 12 September 2017

Re: Django runserver not working after installing redis for django channels

2017-09-12 Thread Robin Lery
Yes, i think just running `sudo apt-get install redis-server` installs the old version of redis, instead of the latest one. On Mon, Sep 11, 2017 at 6:40 PM, Artem Malyshev wrote: > Hi, > > Please check your redis installation. It should be at least minimum > required

Re: Need advice on writing very specific custom user roles

2017-09-12 Thread Melvyn Sopacua
It requires some work writing the permissions, but this is what django-guardian [1] is good at. I would ditch Role as a user attribute and use groups instead. If cities are limited in number, I would make city groups as well and then it's just a matter of filtering groups the right way taking

Re: changing row color in django admin model

2017-09-12 Thread Derek
If you use django-suit as a custom (and much upgraded!) admin interface, this facility is built-in. See http://djangosuit.com/ and look for the section "List row and cell attributes" On Tuesday, 12 September 2017 08:54:01 UTC+2, vishnu bhand wrote: > > hello ,How should i change entire row

Re: Email validation in form

2017-09-12 Thread Daniel Roseman
On Tuesday, 12 September 2017 14:18:29 UTC+1, Daniel Roseman wrote: > > On Tuesday, 12 September 2017 08:52:37 UTC+1, Moreplavec wrote: >> >> >> >>> {% csrf_token %} >>> {{ form.non_field_errors }} >>> {% for hidden in form.hidden_fields %} >>>

Re: Email validation in form

2017-09-12 Thread Daniel Roseman
On Tuesday, 12 September 2017 08:52:37 UTC+1, Moreplavec wrote: > > > >> {% csrf_token %} >> {{ form.non_field_errors }} >> {% for hidden in form.hidden_fields %} >> {{ hidden }} >> {% endfor %} >>

Re: Revert database scheme based on django migrations

2017-09-12 Thread Alessandro Madruga Correia
Hi there To go to a specific migration just run $ python manage.py migrate About your data I think is better you make backup. Em 11 de set de 2017 20:11, "Luis Zárate" escreveu: Hello people, I really would like you to help me with some thing I need to solve. I have

Re: Email validation in form

2017-09-12 Thread Vijay Khemlani
If you render the form using the typical methods ("{{ form.as_p }}" or similar) then there should be a message over the email field with the error. >From the code, you an use form.errors to check the errors in the form. On Tue, Sep 12, 2017 at 8:10 AM, Moreplavec

Re: Email validation in form

2017-09-12 Thread Moreplavec
I understand, but why while using model form it's not cought by form itself same as missing or incorect field like "asdf" for email? This is my problem. I need to show error and not to try to save :) Dne úterý 12. září 2017 12:47:16 UTC+2 Vijay Khemlani napsal(a): > > "asdf@asdf" is not a

Re: Non relational databases (MongoDB) with Django

2017-09-12 Thread Nes Dis
Hello If you are looking for a way to connect MongoDB to Django, You should take a look at djongo a driver for allowing Django to use MongoDB as the database backend. You dont need a non-rel version of Django to go with it either!!! On Wednesday, 17 August

Dynamically adding a field to a model - via contribute_to_class

2017-09-12 Thread gernot . cseh
Hi, I don't know if crossposting with stackoverflow is allowed here but essentially my problem is explained in https://stackoverflow.com/questions/46162104/django-dynamic-model-fields-and-migrations. What I want to create is a custom ModelField of type DecimalField, that dynamically adds

Re: SESSION_ENGINE

2017-09-12 Thread Nes Dis
You can use djongo as the connector to get your admin, session and auth up and running! On Wednesday, 8 March 2017 07:15:52 UTC+5:30, mohamed shawky wrote: > > any one use session and auth > when backend is mongodb > any help > > -- You received this

Re: Email validation in form

2017-09-12 Thread Vijay Khemlani
"asdf@asdf" is not a valid email so form.is_valid returns False and form.save is never called On Tue, Sep 12, 2017 at 4:52 AM, Moreplavec wrote: > Greetings, > > i have strange problem with my model form. I have simple form for taking > orders, model looks like: > >

Email validation in form

2017-09-12 Thread Moreplavec
Greetings, i have strange problem with my model form. I have simple form for taking orders, model looks like: class Order(models.Model): > name = models.CharField(max_length=50, blank=False, > verbose_name='Jméno') > surname = models.CharField(max_length=50, blank=False, >

changing row color in django admin model

2017-09-12 Thread vishnu bhand
hello ,How should i change entire row color base on some attribute value in admin model ? -- 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