Re: Expected Behavior with Proxy Models

2014-01-23 Thread Viktor Nagy
Hi, the problem was with defining the managers on the Proxy model. As more recent docs say, managers should be defined separately: https://docs.djangoproject.com/en/dev/topics/db/models/#proxy-model-managers this is already fixed in zinnia 0.14. On Wednesday, December 18, 2013 7:30:53 PM UTC+1

simple venue representation

2009-03-18 Thread Viktor Nagy
uch a simple model a good idea? Thanks for you help! Viktor -- Viktor Nagy - http://viktornagy.com PhD student Toulouse School of Economics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

how to use django-profiles?

2009-03-10 Thread Viktor Nagy
Hi, I just can't figure out how to use django-profiles. I've an application called ``membership``, and there I have a models.py file containing: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) affiliation = models.TextField(blank=False,

Last-Modified headers and render_to_response

2009-01-24 Thread Viktor Nagy
27;headers'] dictionary, and add all of its elements to the HttpResponse object. How would you achieve this? V -- Viktor Nagy - http://viktornagy.com PhD student Toulouse School of Economics --~--~-~--~~~---~--~~ You received this message because you are su

how to create json from template?

2008-12-02 Thread Viktor Nagy
? Or how to use json syntax in the template in general? thanks, V [1]: http://toastdriven.com/fresh/more-multiresponse -- Viktor Nagy - http://viktornagy.com PhD student Toulouse School of Economics --~--~-~--~~~---~--~~ You received this message because you ar

how to test uploading of a file?

2008-08-29 Thread Viktor Nagy
Hi! I would like to write a simple test to see that the files uploaded through a form are properly saved. Could someone tell me what data should I post in the testclient? thanks, Viktor --~--~-~--~~~---~--~~ You received this message because you are subscribed to

how to get {% url %} working with {% blocktrans %}?

2008-08-23 Thread Viktor Nagy
Hi! I need a url in a blocktrans message, but I have no clue how to do it. it would be intuitive to use {% blocktrans url app.views.add as createurl %} and then {{ createurl }} but it didn't work for me. could someone help me, please! Viktor --~--~-~--~~~---~--~-

QuerySets are scary!

2008-08-23 Thread Viktor Nagy
I just noticed that yourqueryset[0].save() is not the same as yourqueryset0 = yourqueryset[0] yourqueryset0.save() at least the first didn't gave the expected outcome for me see the attached test (it is enough to look at app/tests.py) is this true or both my test and real code are

how to use PythonAuthzHandler with django?

2008-07-15 Thread Viktor Nagy
Hello, I've set up apache to validate my users using PythonAuthenHandler as described in the documentation (http://www.djangoproject.com/documentation/apache_auth/). This part works like charm :), but I would like to get a more fine grained control over the accessed url (not served by django). A

how does {% url %} work?

2008-07-10 Thread Viktor Nagy
Hi 5! I have the following files myproject/urls.py with a line (r'^$', include('coosci.webapp.urls')), then I have myproject/coosci/urls.py with a line (r'^projects/join/(?P\d+)/$', 'join_project'), and finally in my template {% url webapp.views.join_project project_id=project.project.id %} a

IndexError instead of DoesNotExist with filter( )[0]

2008-05-30 Thread Viktor Nagy
Hi, I have the following code in my views.py ... try: q = models.Queue.objects.filter(type=type, status=0)[0] except models.Queue.DoesNotExist: return WebAPIResponseError(request, DOES_NOT_EXIST) ... this would give back the first result that corresponds to type=type and has status 0. I

doctests in views.py

2008-05-22 Thread Viktor Nagy
Hello, I've a very simple views file, that I would like to test with doctests. For example a partial code is this: @require_POST def save(request, type): ''' This adds a new element to the queue >>> response = c.post('/queue/new/email', {'title': 'MyTitle'}) >>> response.status_c

where does this caching come?

2008-05-14 Thread Viktor Nagy
Hello, I am kind of new to django, and trying to build a small app just to learn it (it is an app to interact with Google Calendar and Docs). My problem is, that django seemingly always caches "something". I tried to get rid of this behavior by adding either CACHE_BACKEND = 'dummy:///' or CACHE

how to interact with the user from a caught pre_save/post_save signal?

2008-05-13 Thread Viktor Nagy
Hi, I'm kind of new the django and to learn it I've tried to build a simple calendaring app that would save the event's info locally and create an event at Google Calendar as well. The save locally works fine (I use the admin interface). I also know how to create an event at gcal outside of djan