Oportunidade Python/Django RJ

2018-01-29 Thread edgar
A B Rbid.com está em busca de Desenvolvedores Python, para atuar ativamente no desenvolvimento e manutenção da nossa plataforma de leilão online que é feita em Python/Django. *Requisitos:* - Experiência mínima de 2 anos desenvolvendo em python e Django; - Experiência com dese

Re: Django Class-based Views with Multiple Forms

2016-07-11 Thread Edgar Gabaldi
Hi paul. There is a package called django-extra-views that solve exactly this problem. See CreateViewWithInlines (or something like that). Em 7h40 Seg, 11/07/2016, Paul escreveu: > By default Django’s class-based views support just a single form per view. > > I need more forms per view because

Django Admin actions with select optgroup

2016-03-30 Thread Edgar Gabaldi
Hi everybody, Someone know if is possible or have a way to change the default action select by a select with optgroup? -- 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 ema

Re: Using ModelForms

2015-08-20 Thread Edgar Gabaldi
The code seems right. Probably your form has some error. Try print {{form.errors}} in your template to check. On Thu, Aug 20, 2015 at 4:45 PM, Hugo Kitano wrote: > Hi, I'm a beginner using Django, and I'm having trouble using model forms > to create instances of my model. > When a user submits a

Re: want some suggestion to learn elastic search

2015-07-01 Thread Edgar Gabaldi
Use the django-haystack[0]. He's a wrapper for some search engines (including elastic search). it's very simple to use. The getting start tutorial[1] is very simple too. [0] http://haystacksearch.org/ [1]http://django-haystack.readthedocs.org/en/v2.4.0/tutorial.html On Wed, Jul 1, 2015 at 8:37 A

The best way to mock querysets

2015-04-30 Thread Edgar Gabaldi
Who practices TDD (XP like) says that the tests need to run quickly. For this, we have to mock all external resources of the method that i want to test. In the case of queryset, i think so strange. Eg: https://gist.github.com/edgabaldi/ffdffa60f2add650f052 Am i doing it wrong? Do i have better wa

Re: Read Only by user in Django Admin

2015-02-08 Thread Edgar Gabaldi
In the get_readonly_fields, you have access to the request.user, you can check the permission inside the method, something like that: def get_readonly_fields(self, request, obj=None): if obj and not request.user.has_perm('your_app.your_custom_permission'): # return a tuple with all f

Re: Read Only by user in Django Admin

2015-02-08 Thread Edgar Gabaldi
The ModelAdmin has a method get_readonly_fields [1]. You can override this method and check a custom permission[2]. [1] https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_readonly_fields [2] https://docs.djangoproject.com/en/1.7/ref/models/options/#permiss

Re: secretar...@atoutpass.fr

2015-02-03 Thread Edgar Gabaldi
Sorry, i think that was a private message. On Tue, Feb 3, 2015 at 1:27 PM, Edgar Gabaldi wrote: > Sorry, i don't speak french. > > can i help you? > > Merci :) > > On Tue, Feb 3, 2015 at 12:12 PM, Alain Abraham wrote: > >> Bonjour, >> c’est Alain. >

Re: secretar...@atoutpass.fr

2015-02-03 Thread Edgar Gabaldi
Sorry, i don't speak french. can i help you? Merci :) On Tue, Feb 3, 2015 at 12:12 PM, Alain Abraham wrote: > Bonjour, > c’est Alain. > > Juste une pièce jointe à montrer à Jean-Pierre. > > Merci > > Alain > > -- > You received this message because you are subscribed to the Google Groups >

Re: Restrict downloading files in Django?

2015-01-31 Thread Edgar Gabaldi
i don't know if this is the best way to do that. But you can create a view that response the file after verify the user credentials. The problem is: once the user knows the urls from file, he can share the url with others. Its not difficult create an "one time url" to the request to solve this p

Re: django select extremely slow on large table

2015-01-23 Thread Edgar Gabaldi
You can try to put a db_index=True in markid field. https://docs.djangoproject.com/en/1.7/ref/models/fields/#db-index On Fri, Jan 23, 2015 at 9:59 AM, Jani Tiainen wrote: > On Fri, 23 Jan 2015 03:38:19 -0800 (PST) > Joris Benschop wrote: > > > And to keep replying to myself: > > > > This one i

Re: django.contrib.auth doesn't support template context processors?

2015-01-20 Thread Edgar Gabaldi
did you register the context processor in settings? On Tue, Jan 20, 2015 at 3:32 AM, Mark Rogaski wrote: > Hello, > > I'm coming back to Django after working with 1.4/1.5. Within a custom > template for auth.views.password_reset, I'd like to access the request > data using django.core.context_p

Re: Windows path for django_crontab

2015-01-18 Thread Edgar Gabaldi
To do periodic tasks you can use celery[1]. I believe that on windows works fine. [1] http://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html On Sun, Jan 18, 2015 at 9:24 PM, Mike Dewhirst wrote: > On 19/01/2015 8:54 AM, sarfaraz ahmed wrote: > >> Hello All, >> >> I am trying to u

Re: Internal server error

2015-01-18 Thread Edgar Gabaldi
Nicky, Internal server error means that your application has a programming error. You can see your webserver log to find the error to fix. On Sun, Jan 18, 2015 at 5:43 PM, Nicky Setia wrote: > Hi, > I am following the Django tutorial and after I put my site up using > Dreamworks hosting, it is g

Re: updating data in a row

2015-01-11 Thread Edgar Gabaldi
add or update multiple rows, maybe you should see a little about formsets[1]. [1] https://docs.djangoproject.com/en/1.7/topics/forms/formsets/ On Mon, Jan 12, 2015 at 12:30 AM, sum abiut wrote: > I want to be able to click on a row, update it and then click on another > row update it and so on.

Re: Django Class-Based CreateView and UpdateView with multiple inline formsets

2015-01-10 Thread Edgar Gabaldi
Use the django-extra-views[1]. You can easily manage multiple inline formsets with CreateViews and UpdateViews. [1] https://github.com/AndrewIngram/django-extra-views On Sat, Jan 10, 2015 at 11:23 AM, Dan Gentry wrote: > I would suggest that in the UpdateView you should set the object to the >

Re: django form field validation and error display

2015-01-08 Thread Edgar Gabaldi
There is not your problem, but maybe will be in future. The best way to clean fields that depend of other fields is override the clean method of form. https://docs.djangoproject.com/en/1.7/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other On Thu, Jan 8, 2015 at 9:28 A

Re: create unmanaged model to oracle view/synonym

2015-01-01 Thread Edgar Gabaldi
Fabio, Django ORM support Oracle Database[1]. If you want connect an existing oracle database, i recomend you see the inspectdb management command. [1] https://docs.djangoproject.com/en/1.7/ref/databases/#oracle-notes [2] https://docs.djangoproject.com/en/1.7/howto/legacy-databases/ On Thu, Ja

Re: FormSets with arbitary number of forms

2015-01-01 Thread Edgar Gabaldi
The formset allow you create many instances of an object. What you need is the inline formset. When you create a Album, you can create one or more songs. On Wed, Dec 31, 2014 at 4:59 PM, Some Developer wrote: > I've been reading the documentation on FormSets and must admit that I am a > bit conf

UnicodeDecodeError in python manage.py flush

2014-01-20 Thread Edgar Reyes
Hi, I'm looking in google search about this error but I didn't find anything similar. Any suggestions ? python manage.py flush You have requested a flush of the database. This will IRREVERSIBLY DESTROY all data currently in the 'cbbc' database, and return each table to the state it was in after