New model_mommy release + Deprecation Warning

2019-10-22 Thread Bernardo Fontes
ou to migrate your project from model_mommy to model_bakery and the reasons behind this renaming can be found here: https://model-mommy.readthedocs.io/en/latest/ Thanks, -- Bernardo Fontes http://berinfontes.com http://pessoas.cc Skype: bernardoxhc +55 11 98398 2378 -- You received this message be

Django - Updating multiple models from a form - Data does not saved

2017-04-12 Thread Bernardo Garcia
I have a custom User model to manage some profiles user: is_student, is_professor and is_executive In this model, in addition, I have the get_student_profile(), get_professor_profile() andget_executive_profile() methods to get the user profiles data of each user from my different views. cla

Binding data to one o many forms from one view - BadHeaderError at - Header values can't contain newlines ()

2017-04-08 Thread Bernardo Garcia
I have the following forms to each user profile class UserUpdateForm(forms.ModelForm): class Meta: widgets = {'gender':forms.RadioSelect,} fields = ("username", "email", "is_student", "is_professor", "is_executive",) model = get_user_mode

Accessing to objects of a dynamic way in django template

2016-12-04 Thread Bernardo Garcia
I have the following class based view in which I perform to queryset: class PatientDetail(LoginRequiredMixin, DetailView): model = PatientProfile template_name = 'patient_detail.html' context_object_name = 'patientdetail' def get_context_data(self, **kwargs): co

WOrking with checkbox Multiple Select FIeld - Django Admin

2016-10-29 Thread Bernardo Garcia
HI, friends. Someone know how to work with a field that allow perform a multiple selection in a field?, like a checkbox. In django admin, Thanks :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

How to read the json file of a dinamical way in relation to their size structure

2016-10-10 Thread Bernardo Garcia
I have the following JSON file named ProcessedMetrics.json which is necessary read for send their values to some template: { "paciente": { "id": 1234, "nombre": "Pablo Andrés Agudelo Marenco", "sesion": { "id": 12345, "juego": [ { "nombre": "bonzo",

Re: Django Admin actions with select optgroup

2016-03-30 Thread Bernardo Garcia
When you talk about of optgroup you mean the choicegroup? In affirmative case, this can be that you looking .. https://docs.djangoproject.com/en/1.9/ref/models/fields/#choices Also is possible that MultipleSelectField can be useful for you? In affirmative case, this thread can be useful... https

Deploy static assets to heroku from local machine - can't open file 'manage.py': [Errno 2] No such file or directory

2016-03-30 Thread Bernardo Garcia
I am trying deploy my assets files to heroku and I get this output in my command line interface: (nrb_dev) ➜ neurorehabilitation_projects git:(master) ✗ heroku run python manage.py collectstaticRunning python manage.py collectstatic on neurorehabilitation up, run.5168 python: can't open

Deploy Django to Heroku - Push rejected

2016-03-26 Thread Bernardo Garcia
I am trying deploy my Django application to heroku and I get an error when I perform git push heroku master command My structure directory is the following And the content of requirements/production.txt is: -r base.txt gunicorn==19.4.5 dj-database-url=

Deploy Django to Heroku - Push rejected

2016-03-20 Thread Bernardo Garcia
I am trying deploy my Django application to heroku and I get an error when I perform git push heroku master command Do you know the reason which I get this error? uleague) ➜ pickapp git:(master) ✗ git push heroku masterCounting objects: 195, done.Delta compression using up to 8 threads.Compres

Re: MultipleCharField

2016-03-08 Thread Bernardo Garcia
Hi RAfael. I am using this app for multi select fields https://github.com/goinnn/django-multiselectfield which perform a render the options like checkbox of multiple selection in the django admin forms You should install it of this way 1. Download the tar.gz file from https://pypi.python.org/

Handling fields with values that depend on a value from previous file

2016-03-02 Thread Bernardo Garcia
I want handling fields' values which depend on a value from another field Currently I am working with django-smart-selects but I have this problems

Re: problem deploying two apps

2016-03-02 Thread Bernardo Garcia
Hi frocco May be this post can ve useful for you, althought instead of uwsgi use gunicorn http://michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/ On Tuesday, March 1, 2016 at 11:56:57 AM UTC-5, frocco wrote: > > Hi, > > I followed this > h

django-smart-selects: ChainedManyToManyField value not selected after saving data via django admin

2016-03-02 Thread Bernardo Garcia
I am working with django-smart-selects via django admin form. The idea that I have is try a model chaining or deployment of value fields accord to previous value in a previous separate field. Accord to the first option value selected in the f

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
-90-253-22.compute-1.amazonaws.com/ What is the order in which I should setup the headers? Thanks On Tuesday, February 23, 2016 at 4:51:16 PM UTC-5, James Schneider wrote: > > > > On Tue, Feb 23, 2016 at 6:03 AM, Bernardo Garcia > wrote: > >> Hi everyone Djangonauts >>

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
ovknFmsgor4ius" | perl -pe \ > 's/(.)/chr(ord($1)-2*3)/ge' > *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh > <https://fedoraproject.org/wiki/User:Fellipeh>* > *Blog: *http:www.fellipeh.eti.br > *GitHub: https://github.com/fellipeh <https://gi

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
mple it tells to use: > > bind = '127.0.0.1:8001' > > are you binding to 127.0.0.1 ? > > On Tue, Feb 23, 2016 at 4:33 PM, Bernardo Garcia > wrote: > >> Hi Mr. Avraham Serour thanks for the attention >> >> In my amazon ec2 production server I am run

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
manage.py runserver is used just in my local development machine On Tuesday, February 23, 2016 at 9:25:36 AM UTC-5, Avraham Serour wrote: > > are you running django using manage.py runserver? > > > On Tue, Feb 23, 2016 at 4:03 PM, Bernardo Garcia > wrote: > >&

API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
Hi everyone Djangonauts :) Currently I am exposing a Django application (for the momento is just thier users schema) with Django Rest Framework and happen that each serialized model, in the url attribute, I have is the localhost machine address development and don't take the hostname of my prod

Re: Amazon + Django each 12 hours appears that [Errno 5] Input/output error

2016-01-07 Thread Bernardo Garcia
or deploy > http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/ > . > > > 2016-01-07 9:48 GMT-06:00 Bernardo Garcia > >: > >> This is my error, which again I get despite that yesterday was solved >> restarting my server >> >&g

Re: Amazon + Django each 12 hours appears that [Errno 5] Input/output error

2016-01-07 Thread Bernardo Garcia
rver, and today I have again the error. There is some problem with EC2 infraestructure with Django (I don't think so) or the problem is more for my application side? I don't think so that the function get_context_data() of my application be the problem ... On Wednesday, January 6, 20

Re: Working with Django signals

2016-01-06 Thread Bernardo Garcia
.9/topics/auth/default/#django.contrib.auth.forms.UserCreationForm >- > > https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#extending-the-existing-user-model >- > > https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#django.contrib.admin.ModelAdmin

Amazon + Django each 12 hours appears that [Errno 5] Input/output error

2016-01-06 Thread Bernardo Garcia
I recently setup and deploy an Amazon EC2 instance for deploy my django project. I was interacting with my application via browser when I get this error in the browser: errno 5 input/output error django This error did reference to some function of my application, but in my console the

Working with Django signals

2015-12-30 Thread Bernardo Garcia
I have a custom users schema in Django for work with roles or users type, creating an application named userprofile which will be or will setup my custom user model. In my settings.py I have the following configuration: INSTALLED_APPS = [ ... 'userprofile',]#Custom model Users AUT

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Bernardo Brik
GET[ ... ] On Tue, May 5, 2015 at 1:48 PM, Ken Nguyen wrote: > Hi Bernardo, > > I appreciate the feedback. I've heard of many ways to pass data between > methods in views such as session, write to a file, or use formwizard. It > is still a problem accessing the session from

Re: How to Process Multi Step Forms in Django?

2015-05-05 Thread Bernardo Brik
quot;/> > {{ forloop.counter0 }} > > {% endfor %} > > > > Cancel > > > > > > All there's left to do is create a template for success.html > > > > > > Success >

Re: How to Process Multi Step Forms in Django?

2015-05-04 Thread Bernardo Brik
irst_name }} > {{ info.last_name }} > value="1"> > > {% endfor %} > > > When you say inherit from form1 and just add the checkboxes, can you > elaborate that? How do I inherit it? Do you mean just replicate the first &

Re: Template syntax issues w dict

2015-05-02 Thread Bernardo Brik
just a small correction – lose the parens after items: {% for org, num in attendees_per_org.items %} On Friday, May 1, 2015 at 4:48:25 AM UTC-3, ADEWALE ADISA wrote: > > If I can understand your code, of seems you want a table of : Institution > | Number of attendees > So if am right u can achive

Re: How to Process Multi Step Forms in Django?

2015-05-02 Thread Bernardo Brik
You should add the same fields (first_name and address) to form2 and render them with hidden inputs. You can try to make form2 inherit from form1 and just add the checkbox. On Friday, May 1, 2015 at 9:58:28 PM UTC-3, Ken Nguyen wrote: > > I've made some attempted to use formwizard but there wasn'

Occasional IntegrityError on m2m fields using PostgreSQL

2012-11-01 Thread Bernardo
to reproduce it but it's very hard, only happens occasionally. Any idea what could cause it? Could maybe setting auto commit solve this problem? Thanks in advance Cheers, Bernardo -- You received this message because you are subscribed to the Google Groups "Django users" group.

Best approach for multiple sites in a single deployment?

2012-04-10 Thread Bernardo
I would like to create a subdomain based authentication system, like the one on 37signals, freshbooks, codebase, etc. The objective is to do something like smaller but in far smaller scale (I suppose a maximum of 100-1000 blogs). All other models (blog posts, comments, etc) already have a forei

Re: Decorator aware Django

2011-12-15 Thread Bernardo
> Use Class-based views[1] and subclass them as needed? Earlier today I saw a blog talking about that. I haven't read everything, but seems that it is what I want. I still need to see how to combine multiple Class based views to treat my data. Thanks! Bernardo On Dec 15, 3:48 pm, And

Re: Decorator aware Django

2011-12-15 Thread Bernardo
; Now I have to overcome this feeling with ORMs ORMs are great. I've already spent too many years writing SQL by hand and I regret the time I lost. Regards Bernardo On Dec 14, 7:57 pm, Matej Cepl wrote: > On 13.12.2011 15:14, Javier Guerra Giraldez wrote: > > > for me, is op

Re: Decorator aware Django

2011-12-13 Thread Bernardo
n't know if I understand what you're saying but the decorator approach is working exactly like that but instead of calling these generic views, I decorate my view with it. Could you explain me that with a simple snippet? Regards, Bernardo On Dec 13, 12:14 pm, Javier Guerra Giraldez wrot

Decorator aware Django

2011-12-12 Thread Bernardo
alizer to return HTTP data to a Ajax request using the correct mimetype to avoid making the programmer remember this kind of information (or even how to instantiate the serializer class). Well, these were my thoughts and feel free to think otherwise. I would appreciate to know if something

Re: Testing if a receiver is connected to a signal

2011-05-05 Thread Bernardo Fontes
.receivers = [] @classmethod def tearDownClass(cls): my_signal.receivers = cls.signal_receivers Hope I could help! -- Bernardo Fontes http://www.bernardofontes.net bernardo...@gmail.com Skype: bernardoxhc (21) 9629 1621 -- You received this message because you are subscri

Re: Testing if a receiver is connected to a signal

2011-04-19 Thread Bernardo Fontes
Hi, I'm having this problem too. Does anyone knows a good strategy to handle this problem? On 21 fev, 17:50, Vinicius Mendes wrote: > Hi, > > I want to test if a receiver function is connected to a signal in django, > but I don't want other receivers from other apps to be called when my test > r

User Inheritance and i18n

2009-11-11 Thread Bernardo
try to switch to a language with a form that calls the setlang view from (r'^i18n', include('django.conf.urls.i18n')) I get the following error: "No CustomUser matches the given query." Is there anything I can do to get i18n working again