Re: JSONField filter fails with TypeError: can only concatenate tuple (not "list") to tuple

2019-11-01 Thread Raffaele Salmaso
On Fri, Nov 1, 2019 at 10:38 PM John-Paul Navarro wrote: > The following fails with Django 2.2.6 but works with Django 1.11.x. > https://code.djangoproject.com/ticket/30826 -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso | https://github.com/rsalmaso -

Re: 404 error when posting a multipart/form-data form

2019-03-22 Thread Raffaele Salmaso
On Thu, Mar 21, 2019 at 2:42 PM Manlio Perillo wrote: > The view code is here: > https://gist.github.com/perillo/2f828209cea84ff8c753f6f2524119f1 > I don't see the {% csrf_token %} in the template -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso | https://g

[ANN] django-service-urls 1.1.0

2019-01-19 Thread Raffaele Salmaso
'default': os.environ.get('DATABASE_DEFAULT', 'postgres://myuser:mypasswd@localhost:5432/mydb'), } CACHES = { 'default': os.environ.get('CACHE_DEFAULT', ''memcached://127.0.0.1:11211 '), } EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', 'smtp://localhost:25') -- | Raffaele Salmaso |

[ANN] django-service-urls 1.0.1

2018-12-23 Thread Raffaele Salmaso
'), } EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', 'smtp://localhost:25') -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso | https://github.com/rsalmaso -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: DEFAULT_FILE_STORAGE and tests

2018-09-20 Thread Raffaele Salmaso
unner(DiscoverRunner): pass (override_settings does a lot of other things) or use a custom DJANGO_SETTINGS_MODULE -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso | https://github.com/rsalmaso -- You received this message because you are subscribed to the Googl

Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Raffaele Salmaso
On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng <zen1...@gmail.com> wrote: > > When I use django==1.10.7, this does not happen. > When I use django==1.11a1 this happens. > Why 1.11a1? Current is 1.11.4 -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso |

Re: EMAIL_BACKEND doesn't works with Amazon SES!?

2016-03-29 Thread Raffaele Salmaso
ORD = '...' > EMAIL_USE_TLS = True > My config EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = "email-smtp.$zone.amazonaws.com" EMAIL_PORT = 587 EMAIL_HOST_USER = "$USER" EMAIL_HOST_PASSWORD = "$PASSWORD" EMAIL_USE_TLS = True Diffe

Re: Changing the AdminSite instance (and class) to use BEFORE the autodiscover runs

2016-01-22 Thread Raffaele Salmaso
ils.translation import ugettext_lazy as _ class Config(AppConfig): name = "myproject" verbose_name = _("My Project") def ready(self): super(Config, self).ready() from django.contrib import admin from myproject.admin.sites import site admin

Re: I really about to give up Django

2013-08-22 Thread Raffaele Salmaso
he Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups

Re: django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Raffaele Salmaso
t; NameError: name 'settings' is not defined did you forget to include from django.conf import settings in /home/michael/www/project/news/models.py? -- | Raffaele Salmaso | http://salmaso.org | https://bitbucket.org/rsalmaso | http://gnammo.com -- You received this message because you are subscribed to the

Re: Django with Apache and mod_python

2010-06-05 Thread Raffaele Salmaso
Jagdeep Singh Malhi wrote: > MOD_PYTHON ERROR > please help... use mod_wsgi, mod_python is old and not more mantained http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-deployment-modwsgi -- ()_() | That said, I didn't actually _test_ my patch. | + (o.o) | That's

Re: Generic Relations and Django Admin?

2010-01-19 Thread Raffaele Salmaso
Victor Hooi wrote: > I tried that, and the fields aren't there, but when I try to save the > object, I get a: > > IntegrityError at /admin/people/address/add/ > people_address.content_type_id may not be NULL > > so obvoiusly Django doesn't like it if those fields aren't filled. it's a

Re: Generic Relations and Django Admin?

2010-01-18 Thread Raffaele Salmaso
Victor Hooi wrote: > class AddressAdmin(VersionAdmin): > pass > class AddressInline(generic.GenericTabularInline): > model = Address > ... fields = (the fields you want to display) or exclude = ('content_type', 'object_id',) > class HospitalAdmin(admin.ModelAdmin): >

Re: Changing database name on the fly

2009-12-24 Thread Raffaele Salmaso
S.Selvam wrote: > Hi all, > > I have a a need to decide the database dynamically.On submitting the > form,i would check a parameter action in my views.py. > > if action=="dummy": >DATABASE_NAME=maindb_tmp > else: >DATABASE_NAME=maindb > > But that does not work,it always chooses

Re: optional parameter url

2009-02-25 Thread Raffaele Salmaso
Adonis wrote: > (r'^appname/mainpage/(?P.*)$', 'django.views.static.serve', > {'document_root': '/mesa'}), this takes *everything* as 'path' > (r'^appname/mainpage/(?P\d+)/(?P.*)$', > 'django.views.static.serve', {'document_root': '/mesa'}), this takes only digits as 'xexe', but it never get

Re: Multiple static media roots?

2009-01-24 Thread Raffaele Salmaso
John Baker wrote: > Any suggestions? write a custom file storage http://docs.djangoproject.com/en/dev/topics/files/ -- ()_() | That said, I didn't actually _test_ my patch. | + (o.o) | That's what users are for! | +---+ 'm m' |

Re: splitting tests.py

2009-01-23 Thread Raffaele Salmaso
gderazon wrote: >> tests/ >> +- __init__.py >> +- test1.py >> +- test2.py >> \- test3.py if you are using unittest in __init__.py: from test1.py import * from test2.py import * from test3.py import * if you are using doctest in __init__.py: from test1 import MY_TEST1 from test2 import

Re: splitting tests.py

2009-01-23 Thread Raffaele Salmaso
gderazon wrote: > My tests.py has become too big, I want to split it to several test > files and still be able to run the tests with manage.py tests ... > How can I do that? > I'm working with django 1.0 stable release. tests/ +- __init__.py +- test1.py +- test2.py \- test3.py -- ()_() | That

Re: modelForm

2008-10-14 Thread Raffaele Salmaso
Alfredo Alessandrini wrote: > I don't understand where is the difference... indentation, so different code paths -- ()_() | That said, I didn't actually _test_ my patch. | + (o.o) | That's what users are for! | +---+ 'm m' |

Re: modelForm

2008-10-14 Thread Raffaele Salmaso
Alfredo Alessandrini wrote: > def setup_player(request): > if request.method == 'POST': > form = PlayerForm(request.POST) > if form.is_valid(): > form.save() > return HttpResponseRedirect(form_successfully) > else: > form =

Re: 'maxlength problem'

2008-09-03 Thread Raffaele Salmaso
zissan wrote: > title = models.CharField(maxlength=200) now is max_length > Is there something has been chaged sine 0.96? a lot see http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges for a full list -- ()_() | That said, I didn't actually _test_ my patch. | + (o.o) |