Re: What is the ideal web server to use with Django?

2015-05-12 Thread kk
I would suggest using Nginx. happy hacking. Krishnakant. On Wednesday 13 May 2015 06:42 AM, akshat wrote: I am new to Django. I am building a app which will have to handle several concurrent requests. Which web server is suitable for this? I have read that Apache's performance degrades on high

Re: Suggiestion on how split a views.py file

2015-05-12 Thread Karim
On Wed, May 13, 2015 at 5:45 AM, James Schneider wrote: > There's no requirement that you use views.py, or any of the file names > that are created using 'django-admin.py', ​Thanks James for the answer, my problem is to update the various import in my app to refer to the new file with the code

Re: rollback the update query

2015-05-12 Thread Simran Singh
Hi Tom, If you see then in *if *block, I am creating my savepoint. At any point of time, if the condition is not met and control goes to *else* block then I want to rollback all the changes that are saved in transaction and redirect it to some other page and not commit anything to db. I am able

Re: Django model inheritance: create sub-instance of existing instance (downcast)?

2015-05-12 Thread Mario Gudelj
Have you had a look at http://django-model-utils.readthedocs.org/en/latest/managers.html#inheritancemanager? I'm not sure if it will help but it's kind of related to what you've posted. On 12 May 2015 at 23:10, guettli wrote: > Hi, > > this ticket is seven years old > > https://code.djangoprojec

Re: django-allauth without username, login with facebook doesn't work

2015-05-12 Thread Mario Gudelj
What do you mean by nothing happens? Do you get taken to FB? Here's what I have in my setup which may help: The template link looks like this: Facebook Make sure you have the following line in your urls.py: url('', include('social.apps.django_app.urls', namespace='social')) settings.py: SOCI

Re: How to go about building complicated web apps with django?

2015-05-12 Thread Mario Gudelj
"Should I start building a basic web app and then iteratively" <<< This. Then buy this book https://highperformancedjango.com/ after you've done things like these http://www.revsys.com/blog/2015/may/06/django-performance-simple-things/ On 13 May 2015 at 11:04, akshat wrote: > I am new to django

Re: What is the ideal web server to use with Django?

2015-05-12 Thread Mario Gudelj
The most common setups I came across are Nginx + Gunicorn and Nginx + uWSGI. Nginx + Gunicorn is really easy to setup and it will probably be sufficient. You just need to have enough Gunicorn workers running for your amount of traffic. I really like this setup http://michal.karzynski.pl/blog/2013/0

Re: Suggiestion on how split a views.py file

2015-05-12 Thread James Schneider
There's no requirement that you use views.py, or any of the file names that are created using 'django-admin.py', and you can create as many others as you like. You can run an entire Django project from a single file if you were so inclined. All of the file name references are just for convention an

Re: Mongodb + django

2015-05-12 Thread Abhijit Chatterjee
On Tuesday, May 12, 2015 at 10:01:36 PM UTC-4, Abhijit Chatterjee wrote: > > Have anyone had any experience with mongo db? I couldn't get the admin > panel to work in django. Also, I couldn't save() my database object. > > I have been going through this tutorial but I couldn't make it to work

Mongodb + django

2015-05-12 Thread Abhijit Chatterjee
Have anyone had any experience with mongo db? I couldn't get the admin panel to work in django. Also, I couldn't save() my database object. I have been going through this tutorial but I couldn't make it to work after "Add Data with the Shell" -- You received this message because you are subs

What is the ideal web server to use with Django?

2015-05-12 Thread akshat
I am new to Django. I am building a app which will have to handle several concurrent requests. Which web server is suitable for this? I have read that Apache's performance degrades on high load. -- You received this message because you are subscribed to the Google Groups "Django users" group.

How to go about building complicated web apps with django?

2015-05-12 Thread akshat
I am new to django. I have till now built tutorial apps and read almost 25% of the source code of django. Right now I guess I have decent know-how of django but since I have not built large-scale app on django hence the question. I am building a web app which I know will involve various complexi

Re: committing after fixture load or running tests without transactions

2015-05-12 Thread Larry Martell
On Tue, May 12, 2015 at 8:19 PM, Mike Dewhirst wrote: > On 13/05/2015 5:07 AM, Larry Martell wrote: >> >> I have a situation where I need to run an external python script in a >> test after the tables are loaded from fixtures. This doesn't work >> because django runs the tests in a transaction and

Re: committing after fixture load or running tests without transactions

2015-05-12 Thread Mike Dewhirst
On 13/05/2015 5:07 AM, Larry Martell wrote: I have a situation where I need to run an external python script in a test after the tables are loaded from fixtures. This doesn't work because django runs the tests in a transaction and the external python script is running in its own MySQL connection

Suggiestion on how split a views.py file

2015-05-12 Thread Karim
Hello everyone! I have a huge views.py about 1200 lines. I would like to split it in different files moving some classes. Do you have any suggestion on how handle the import/dependencies in the project? Thanks -- Karim N. Gorjux -- You received this message because you are subscribed to the Go

Django 1.8: Problem with GenericRelation

2015-05-12 Thread hemabe
Hi, I upgraded from Django 1.7 to 1.8 and now I get this error, if I try to access the content_object of a GenericRelation: ERROR: 'NoneType' object has no attribute '_base_manager' Context: I overwrote the save-method in my app and try to get information about the object, which is being saved

Re: Interaction of Python Code with Django.

2015-05-12 Thread Gergely Polonkai
The tricky part here is providing the input for the interactive tool. For shell scripts there is a software called expect, you may want to look for Python alternatives. Of course, if this interactive tool reads sequential input from stdin and sends output to stdout, there are much easier solutions,

committing after fixture load or running tests without transactions

2015-05-12 Thread Larry Martell
I have a situation where I need to run an external python script in a test after the tables are loaded from fixtures. This doesn't work because django runs the tests in a transaction and the external python script is running in its own MySQL connection from the test so it's in its own transaction.

Re: django-allauth without username, login with facebook doesn't work

2015-05-12 Thread Fellipe Henrique
Just to complement the previous mail, normal user (django user) like super-user create using syncdb, works fine! I'm using django 1.8. T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *Blog: http://fhbash.wordpress.c

django-allauth without username, login with facebook doesn't work

2015-05-12 Thread Fellipe Henrique
Hello, I'm trying to use Django-AllAuth social login... I have a custom user profile and custom usermanage [1] But, when I click on html template facebook link, anything happen! with username, works fine. Here is my settings [2] My settings is wrong? any idea why this problem happens? Thanks

Re: Question: standalone django application

2015-05-12 Thread Tom Evans
On Tue, May 12, 2015 at 4:01 PM, Abhijit Chatterjee wrote: > Idk if this is the right forum to post this question but I have been > fiddling around with: > > https://pypi.python.org/pypi/django-standalone > > Is django-standalone is only to test ORM? Or we can also test our controller > function a

Question: standalone django application

2015-05-12 Thread Abhijit Chatterjee
Idk if this is the right forum to post this question but I have been fiddling around with: https://pypi.python.org/pypi/django-standalone Is django-standalone is only to test ORM? Or we can also test our controller function as well? -- You received this message because you are subscribed to

Re: rollback the update query

2015-05-12 Thread Tom Evans
On Tue, May 12, 2015 at 7:47 AM, Simran Singh wrote: > Thanks Tom for your response. I am attaching piece of code of what I have > done. I hope this could help. > > @transaction.atomic(None, True) > def reservation(request): > > if request.method == 'POST': > reservation_form = Reserva

Re: Interaction of Python Code with Django.

2015-05-12 Thread palansh agarwal
Hi, https://github.com/py-geek/Startup-job-search look at the code in this repo an try to understand. It's a simple job search portal developed by me. A simple way is to use a simple HTML form and map it's action attribute to a url. map that url to a method in your urls.py file. write this method

Interaction of Python Code with Django.

2015-05-12 Thread SUBHABRATA BANERJEE
Dear Group, I want to integrate an interactive Python code, (it takes user input, processes input and gives output), with Django. I am new to Django, using Python2.7.9 on Windows 7 Professional. I am researching on it, but as it is a room for Django experts, I am trying to post this question,

Re: REST Beginner's Tutorial

2015-05-12 Thread SUBHABRATA BANERJEE
Thank you Sir, for your kind reply. I ran python manage.py migrate and then issue was fixed at command prompt, but as I tried the http://127.0.0.1/ ... I initially got few indentation errors etc. but the issue seems now fixed as I tried to fix those minor errors. Regards, Subhabrata Banerjee.

Django model inheritance: create sub-instance of existing instance (downcast)?

2015-05-12 Thread guettli
Hi, this ticket is seven years old https://code.djangoproject.com/ticket/7623 {{{ As it exists now, multi-table inheritance does not allow for the creation of a child model instance that inherits from an existing parent model instance. For example: Parent Class- class Place(models.Model):

Re: REST Beginner's Tutorial

2015-05-12 Thread Guilherme Leal
The get status 500 "per se" may or may not be an error. Please, send the traceback of the error, otherwise, we can't help you much. Em ter, 12 de mai de 2015 às 10:00, Guilherme Leal escreveu: > Sorry, but despite the fact that you have unapplied migrations, there is > no error on your app. > >

Re: REST Beginner's Tutorial

2015-05-12 Thread Guilherme Leal
Sorry, but despite the fact that you have unapplied migrations, there is no error on your app. (To apply the migrations, simply run *python manage.py migrate*) Em ter, 12 de mai de 2015 às 09:45, SUBHABRATA BANERJEE < subhabrata.bane...@gmail.com> escreveu: > Dear Sir, > > Thank you for your kin

Re: REST Beginner's Tutorial

2015-05-12 Thread SUBHABRATA BANERJEE
Dear Sir, Thank you for your kind suggestion. But as I was using it I found an error as, Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Admin>cd\ C:\>cd Python27 C:\Python27>cd Lib C:\Python27\Lib>cd site-packages C:\Python27\Lib

Re: REST Beginner's Tutorial

2015-05-12 Thread Guilherme Leal
The shortest way to go is to pick a complete framework for RESTfull apps, like Django Rest Framework . Its complete out of the box, and yet simple as it works as the Django Class Based Views. There are others frameworks ofcourse, or you can do it yourself wit

REST Beginner's Tutorial

2015-05-12 Thread SUBHABRATA BANERJEE
Dear Group, I have just started with Django and like to practice bit of REST. If anyone may kindly suggest a beginners Tutorial for the same. I am using Python 2.7.9 on MS-Windows 7 Professional. Regards, Subhabrata Banerjee. -- You received this message because you are subscribed to the Goog

Re: Django Https issue

2015-05-12 Thread Thomas Levine
I searched the internet for this error message On 11 May 20:41, zichuanxi...@163.com wrote: > *use django shell with uwsgi:* > *I get an error:*** > > and ca

Re: Two questions on Django Tutorial.

2015-05-12 Thread SUBHABRATA BANERJEE
Thanks Tim. It worked. Regards, Subhabrata Banerjee. On Monday, May 11, 2015 at 11:02:50 PM UTC+5:30, Tim Graham wrote: > > You are using Python 2, but the tutorial is written for Python 3 as noted > in part 1. If you aren't willing to switch to Python 3, you can rename the > __str__ method to

Django Https issue

2015-05-12 Thread zichuanxiu06
Hi guys I am using django 1.6 + uwsgi + nginx deploying a web site I cant visit https url with urllib2 when i use uwsgi , if i dont use uwsgi ,then i can visit https url: *use django shell without uwsgi:* In [1]: import urllib2 In [4]: response=urllib2.urlopen("https://www.baidu.com";) In [6]: da

Re: How to represent a calendar month as a field in django models

2015-05-12 Thread Matthys Kroon
Hi, I ended up creating a custom field ( https://github.com/clearspark/django-monthfield). I used a lot of your input, thank you all. Cheers, Matthys On Mon, May 4, 2015 at 7:09 PM, Tim Chase wrote: > On 2015-05-03 14:35, Matthys wrote: > > I posted the question also on stackoverflow: > > >

Re: Use 3rd party django package in my own project (PYTHONPATH)

2015-05-12 Thread Joakim Hove
, > Thanks for the reply. My problem is with this section. can you guide me > how to do this part in Ubuntu or Windows? > > >- > >Add the model_report directory to your Python path. > > Well - the main point is not adding the model_report directory to your Python path per se - the point is

Re: Use 3rd party django package in my own project (PYTHONPATH)

2015-05-12 Thread Kasra Khosravi
Thanks for the reply. My problem is with this section. can you guide me how to do this part in Ubuntu or Windows? - Add the model_report directory to your Python path. On Monday, May 11, 2015 at 12:21:06 PM UTC-7, Kasra Khosravi wrote: > > i am creating a susbcription management