Re: How to approach this problem?

2014-01-09 Thread Rafael Durán Castañeda
You could also check http://yergler.net/blog/2009/09/27/nested-formsets-with-django/ HTH, Rafael El 09/01/2014, a las 01:05, César García Tapia escribió: > django-nested-inlines doesn't seem to work with Django 1.6 > > In case anyone is interested, I solved it with the

Re: Retrieving json stored in TextField as json

2013-10-09 Thread Rafael Durán Castañeda
I'm using django-json-field [1] for solving the same problem. [1] https://github.com/derek-schaefer/django-json-field HTH El 09/10/2013, a las 16:01, Marc Aymerich escribió: > Hi, > I'm storing large volumes of json data in a TextFields, Then I have a > view that converts

Re: IntegrityError with proxy model but not with parent?

2013-09-26 Thread Rafael Durán Castañeda
Hi, As long as I know, a model form needs the fields to be included in order to get validation working, so I suspect you did something like this: class ProxyForm(forms.ModelForm): class Meta: model = models.Myproxy fields = ('name', ) Since stuff field is not included in

Re: How to use selenium test against different browsers using LiveServerTestCase

2013-09-26 Thread Rafael Durán Castañeda
Hi, I don´t know any out-of-the-box solution for this, but sure you can write your own test runner/suite, so any selenium test is run by multiple browsers (maybe just using settings to select the browser). However, if you are really concerned about testing on multiple browsers, multiples

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-22 Thread Rafael Durán Castañeda
nding on your test module, your approach may be the right choice; thought you probably want to check django-nose fast fixtures https://github.com/jbalogh/django-nose#enabling-fast-fixtures or just create DB objects programmatically (using factory_boy or whatever). HTH, Rafael > > Thanks &g

Re: django template string and int comparison behavior

2013-09-17 Thread Rafael Durán Castañeda
Hi, I don´t think using requests objects into templates is a good idea, use request object in the view so you source the template context with whatever you need. HTH El 17/09/2013, a las 20:50, J Y escribió: > I am building a search form that provides a drop down list,

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-16 Thread Rafael Durán Castañeda
Hi, Some answers inline and links at the end: 2013/9/15 Derek > I have an existing Django (1.4) project, with multiple apps and extensive > business logic, that I need to write tests for. Based on a day or two of > reading of the core Django docs and numerous blogs (each

Re: django + selenium testing with several browsers

2012-08-07 Thread Rafael Durán Castañeda
On 08/06/2012 12:34 AM, LS wrote: I have a series of test cases defined using the LiveServerTestCase class provided by Django. I derive a number of classes from it, and run the tests using manage.py test as per the docs at https://docs.djangoproject.com/en/1.4/topics/testing/ This is all

Re: How to serve static files on heroku without any cloud storage like Amazon S3

2012-07-08 Thread Rafael Durán Castañeda
El 08/07/12 06:08, surya escribió: My project is on heroku and my website templates has some CSS, JS files. Totally 5 of them. I don't want to get off with amazon s3 for the sake of those 5 files (very small ones). However, I even need to enter my credit -card, which I don't like :P So, as

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-06-30 Thread Rafael Durán Castañeda
El 30/06/12 17:10, Cal Leeming [Simplicity Media Ltd] escribió: Hi all, As some of you know, I did a live webcast last year (July 2011) on our LLG project, which explained how we overcome some of the problems associated with large data processing. After reviewing the video, I found that the

Re: Testing with LiveServerTestCase and Selenium

2012-06-30 Thread Rafael Durán Castañeda
El 28/06/12 15:45, Paul Childs escribió: Hello, I'm using Django 1.4 and was really excited to learn about the new testing features. I am totally new to this. I seem to have hit a bump in the road. If I overcome this I'm hopeful it will be smooth sailing and I will experience some great

Re: Using middleware to catch custom exceptions in views

2012-06-11 Thread Rafael Durán Castañeda
El 10/06/12 22:25, Daniel Swarbrick escribió: I have a number of views that can raise a custom exception when something unexpected happens (in this particular case, when a back end server TCP socket connection fails). I'd like to use middleware to catch this exception, inject an error message

Re: running a task in fabfile from django

2012-06-07 Thread Rafael Durán Castañeda
On 06/06/2012 01:28 PM, umit sethi wrote: Hi, I have a fabric task eg- def run_task(): #code here From the command prompt I run this task: fab -c env.fabricrc run_task - H hostnamr How can I run this task from django?I click on a button on a webpage in django app and it should do this. How

Re: how to tell apache to see my projects database file?

2012-05-29 Thread Rafael Durán Castañeda
project. how can i add this superuser to apache user group or something like this. i am actually not a linux guru, so i am really stuck here.. Am Dienstag, 29. Mai 2012 21:59:53 UTC+2 schrieb Rafael Durán Castañeda: El 29/05/12 19:07, doniyor escribió: i did 'top', and then " p

Re: how to tell apache to see my projects database file?

2012-05-29 Thread Rafael Durán Castañeda
El 29/05/12 19:07, doniyor escribió: i did 'top', and then " ps aux | grep apache " to see. the root is running the apache. what should i do now? chown root folder/dbfile , right ? Am Dienstag, 29. Mai 2012 17:57:03 UTC+2 schrieb Rafael Durán Castañeda: El 29/05/12 16:5

Re: how to tell apache to see my projects database file?

2012-05-29 Thread Rafael Durán Castañeda
El 29/05/12 16:56, doniyor escribió: hey guys, i need your help again, after successful deployment, i wanted to do something with database but it says: DatabaseError at /ajax/ |unable to open database file| because ajax is trying to write something to db. what can be the problem. in my

Re: django-registration simple backend help

2012-05-28 Thread Rafael Durán Castañeda
El 28/05/12 22:13, Rafael Durán Castañeda escribió: El 28/05/12 21:28, psychok7 escribió: yes i read that part before posting, but i just dont understand the beahaviour of the normal login that redirects me somewhere and the login after registration that redirects me elsewhere. wich one should

Re: django-registration simple backend help

2012-05-28 Thread Rafael Durán Castañeda
, Rafael Durán Castañeda wrote: El 28/05/12 20:18, psychok7 escribió: anyone? On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote: hi there i am writing an app using django-registration 0.8 installed from pip and using the simple-backend my problem

Re: django-registration simple backend help

2012-05-28 Thread Rafael Durán Castañeda
El 28/05/12 20:18, psychok7 escribió: anyone? On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote: hi there i am writing an app using django-registration 0.8 installed from pip and using the simple-backend my problem is, when i register a new user it logs me in after

Re: Thread safety with view arguments in class based views

2012-05-17 Thread Rafael Durán Castañeda
El 17/05/12 22:11, Chris B escribió: Alright. That makes sense. Thanks everyone On Wednesday, May 16, 2012 4:18:49 PM UTC-7, Chris B wrote: According to the docs on the generic class based views : Each request

Re: Thread safety with view arguments in class based views

2012-05-17 Thread Rafael Durán Castañeda
El 17/05/12 04:51, Jon Paugh escribió: That last part refers to the way /Python/ handles arguments and the like. Whenever you have a complex object, such as an array, Python does not make a new copy of the object each time the view function is called. Instead, it passes a reference to the

Re: serialization in Django

2012-03-07 Thread Rafael Durán Castañeda
On 03/06/2012 09:52 PM, shiji bijo wrote: ok I have removed the json.dumps() now the view is def do_GET(self, offset): data=get_object_or_404(NewAuction,pk=offset) context=serializers.serialize("json",[data]) return render_to_response("index.html",{"context":context})

Re: Removing SECRET_KEY from settings.py

2011-09-16 Thread Rafael Durán Castañeda
In addition you can add a local_settings.py.template on repository instead of local_settings.py, so for developtment you can add some fixed fake values for testing and edit with production suitable values when needed. 2011/9/17 Donald Stufft > $ cat settings.py > > ….

Re: How to store variable timedeltas in a Django model?

2011-08-14 Thread Rafael Durán Castañeda
Check this http://dpaste.com/594215/ I've taken it from Marty Alchin's 'Pro Django' book and I just fixed decimal import to get it working On 14/08/11 15:13, Python_Junkie wrote: One of the reasons that I migrated to django is because of the underlying functionality.. With that said I would

Re: Why isnt this simple import working??

2011-08-07 Thread Rafael Durán Castañeda
I think if you should read http://docs.python.org/tutorial/modules.html, specially packages part On 07/08/11 21:51, Hayyan Rafiq wrote: Got it working just inserted a init.py file init. so it got recognized as a python directory

Re: Problem with django book in Forms chapter 7

2011-08-07 Thread Rafael Durán Castañeda
I had the same problem as you, since the book was written using an older django version and there was some changes on csrf for django version 1.2. Looking at django docs https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/#how-to-use-it you can read recommended way to use this On

Re: Question about imports..Python Dejango and Models

2011-08-06 Thread Rafael Durán Castañeda
I'm not a django expert but I think you are wrong. Checking my django installation: - models is package not a python module - __init__.py from this file contains: from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.db import

Re: How do I decode a string that it is received by a filter ???

2011-04-25 Thread Rafael Durán Castañeda
On 25/04/11 20:40, Ariel wrote: The site is deploy in an apache server, that does not help. Do you have any other idea ??? I thought this would be very easy to solve. I'd thanks any help. Regards Ariel On Mon, Apr 25, 2011 at 6:21 PM, Oleg Lomaka

Re: Problems with running Hello world app, urls.py probably ignored

2011-04-23 Thread Rafael Durán Castañeda
I'm not sure, I'm quite new in django, but I think you need to include dashboard in INSTALLED_APPS and looking your urls.py in order to see hello view you need to type http://127.0.0.1:8000/john/hello On 23/04/11 21:57, Honza Javorek wrote: Hello guys, I have searched to solve this for a

Re: __unicode__ in tutorial part 1

2011-04-12 Thread Rafael Durán Castañeda
I think last line from traceback is enough: IndentationError: unexpected indent 2011/4/12 darekodz > I'm using instant django which have: Python 2.7.1 and Django 1.2.4. > When I add > >def __unicode__(self): >return self.question > > and > >def