Re: Adding an API to an existing Django app

2014-01-17 Thread Konstantinos Pachnis
Hi Dennis, You could use content negotiation to achieve what you want http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html On Friday, January 10, 2014 12:27:26 PM UTC+2, Dennis Plöger wrote: > > Hi people! > > I've just searched some time for a way to acomplish something, that seems > to be m

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-17 Thread Erik Cederstrand
Den 16/01/2014 kl. 17.50 skrev Johannes Schneider : > The point is, I have to distinguish between an instance which is created, but > its save method is not yet called. And an instance coming from the database > via a manager. Okay, then create an instance variable on the model instances when

Error when using apache 2.4.6

2014-01-17 Thread Jasvir Singh
Hello everyone. I am facing a problem when I access it in browser. I need your help to solve this error. I am using apache 2.4.6 as web server and django-1.5.2 as framework. Here are my httpd.conf file and wsgi script: http://paste.ubuntu.com/6766758/ http://paste.ubuntu.com/6766759/ When ever I a

Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-17 Thread Timothy W. Cook
On Fri, Jan 17, 2014 at 1:52 AM, Начаров Михаил wrote: > Hi Timothy, > > Note that your mod_wsgi module compiled for using python2.7. So what you > need now is install(compile&install) mod_wsgi for python3 instead of the > same module compiled for python2.7. > On Debian you can do it by this comm

Re: Unofficial Kindle builds of the Django documentation

2014-01-17 Thread Alex Strickland
Hi Markus I've done .mobi builds of the Django documentation so you can read it on a Kindle: Cool! Thanks. Will check it out. -- Regards Alex -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: mass email app for django

2014-01-17 Thread Sergiy Khohlov
In this case you have a problem with deliveries verifying. For example : You would like to send mass email to 1000 mail boxes and uses CC: or BCC: field for this one. But most of the SMTP has a limitation : ex postfix has reading only 50 item in CC list. As result you can not send most of the you

Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-17 Thread Начаров Михаил
You're welcome! You can also take a look to another python web-server. Especially if you want to have for example two sites with different version of python on the same server. When I wrote my first django-app on py3, I faced the same problem. 17.01.2014 15:34, Timothy W. Cook пишет: On F

Django Admin - Duplicating and Filtering Many to Many fields in form

2014-01-17 Thread Ara Sivaneswaran
Hey guys, I am kind of stuck... This is the situation. I got a Match Model, a Player Model and a Team model. Here is what models look like so far: Match Model (simplified version) home_team = ForeignKey(Team) visitor_team = ForeignKey(Team) result time player = ManyToManyField(Player)

Problem in the admin with custom model.clean method and inlines

2014-01-17 Thread parnigot
Hello, I've a problem with the admin and a custom clean method in one of my Models. Here's the code: class Related(models.Model): parent= models.OneToOneField('Parent') ... class Parent(models.Model): simple_mode= models.BooleanField( default=True ) simple_value

Re: Fast and Easy way to check if an instance of an Model exists in the Database

2014-01-17 Thread Tom Evans
On Thu, Jan 16, 2014 at 5:23 PM, Johannes Schneider wrote: > This could be a way to it, but we need this information while handling the > Pre_save singal. So this does not work too. Abuse the django model instance's internals and look to see what database this instance was loaded from - if it is

recording gives me this error

2014-01-17 Thread fabricio
recording gives me this error My model is thus http://pastebin.com/MDM54gg8 my view http://pastebin.com/HGwkaZCK when I try to record v_conta Conta.objects.filter = (= request.user.empresa company.) get (pk = 1 ) v_subconta SubConta.objects.filter = (= request.user.empresa company.) get (

Re: Django Admin - Duplicating and Filtering Many to Many fields in form

2014-01-17 Thread Tom Evans
On Fri, Jan 17, 2014 at 12:38 PM, Ara Sivaneswaran wrote: > Hey guys, > > > I am kind of stuck... > > This is the situation. I got a Match Model, a Player Model and a Team model. > > > Here is what models look like so far: > > > Match Model (simplified version) > > home_team = ForeignKey(Team) > >

Re: Error when using apache 2.4.6

2014-01-17 Thread Andrew Farrell
To bisect your problem, I think that the error happens before the wsgi file even runs. you can test this by putting assert False at the top of /home/jass/Automation/apache/django.wsgi and seeing if the error changes to a 500. If it doesn't, I'm right. If it does, the problem is in django.wsgi Give

Re: Error when using apache 2.4.6

2014-01-17 Thread Sandeep kaur
On Fri, Jan 17, 2014 at 2:29 PM, Jasvir Singh wrote: > > I am using apache 2.4.6 as web server and django-1.5.2 as framework. > Here are my httpd.conf file and wsgi script: > http://paste.ubuntu.com/6766758/ > http://paste.ubuntu.com/6766759/ According to me, in your wsgi file, change sys.path.ap

Re: Django Admin - Duplicating and Filtering Many to Many fields in form

2014-01-17 Thread Ara Sivaneswaran
Wow, really nice way to look at it. I would have never thought about it this way! One little question, is it possible to have all the players already selected in the form? And the admin will remove players who were not part of the game? It's faster to remove 1 or 2 player instead of adding 10-15

Could SelectDateWidget show chinese?

2014-01-17 Thread forrest yang
Just try to use django in a chinese web site. Is that possilbe to make SelectDateWidget show chinese month name? or is there any other workaround? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: Presentation ideas?

2014-01-17 Thread John DeRosa
I’m glad Russ answered too. I was thinking only about tutorials, but neglected to explain that. Not that it was hard to figure out, I supposed. On Jan 16, 2014, at 8:56 PM, Keith Edmiston wrote: > John/Russ, > > Thanks a ton for these suggestions. Great thoughts! > > Keith > -- You receive

Re: Error when using apache 2.4.6

2014-01-17 Thread Jasvir Singh
On Fri, Jan 17, 2014 at 8:37 PM, Andrew Farrell wrote: > To bisect your problem, I think that the error happens before the wsgi file > even runs. > you can test this by putting > assert False at the top of /home/jass/Automation/apache/django.wsgi and > seeing if the error changes to a 500. If it d

Re: Error when using apache 2.4.6

2014-01-17 Thread Jasvir Singh
On Fri, Jan 17, 2014 at 8:53 PM, Sandeep kaur wrote: > that means add slash at the end. No, It didn't works. -- Jasvir Singh Grewal www.jsgrewal.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: Error when using apache 2.4.6

2014-01-17 Thread carlos
Hi i remember one time i try use de version apache 2.4.6 with django and virtualhost but never work correctly and change apache for nginx i resolved my problem :) Cheers On Fri, Jan 17, 2014 at 12:38 PM, Jasvir Singh wrote: > On Fri, Jan 17, 2014 at 8:53 PM, Sandeep kaur > wrote: > > that mean

Re: Error when using apache 2.4.6

2014-01-17 Thread parnigot
Il 17/01/14 19:38, Jasvir Singh ha scritto: On Fri, Jan 17, 2014 at 8:53 PM, Sandeep kaur wrote: that means add slash at the end. No, It didn't works. You should try to use the new configuration directives for Apache 2.4. For more information see here

Re: Could SelectDateWidget show chinese?

2014-01-17 Thread Russell Keith-Magee
Hi Forrest, All the strings used by SelectDateWidget are translated, so it should just be a matter of setting your active locale to zh_CN (or whatever chinese sub locale is more appropriate to your situation). As for how to set your language preference: there are a number of options, depending on

JSON serialization

2014-01-17 Thread Igor Korot
Hi, ALL, I'd like someone to help me understand this situation. Looking at the page: https://docs.djangoproject.com/en/dev/topics/serialization/ the part which says "Serialization formats->JSON" there is an example of how the data would be serialized. The sample uses the symbol "double quotation

Re: JSON serialization

2014-01-17 Thread Mario Gudelj
In your template try {{usb_data|safe}} On 18/01/2014 4:53 pm, "Igor Korot" wrote: > Hi, ALL, > I'd like someone to help me understand this situation. > Looking at the page: > https://docs.djangoproject.com/en/dev/topics/serialization/ the part > which says "Serialization formats->JSON" there is a