Re: A problem with a solution, but is it the right one?

2012-01-23 Thread Derek
That sounds very interesting, Jeff - please post the link here. On Jan 20, 3:47 pm, Jeff Heard wrote: > Yeah, I started doing that after I posted...  Thanks for the advice.  I'll > be posting this code up on GitHub in a few days, as it's part of a > reasonably complete implementation for Django o

Re: retrieve model instance from database without model instance

2012-01-23 Thread Brett Epps
Check out the content types framework[1]. You can do something like: ct = ContentType.objects.get(app_label='products', model='product') obj = ct.get_object_for_this_type(name='Venezuelan Beaver Cheese') However, as you can see in the example, you'll need to know the name of the app so that Djan

retrieve model instance from database without model instance

2012-01-23 Thread brian
How do I retrieve a model instance from the database without a model instance? For example from the doc[1] it has: product = Product.objects.get(name='Venezuelan Beaver Cheese') I want something like getInstance( 'Product', 'Venezuelan Beaver Cheese' ) Here are the details of what I'm doing.

Re: Mediawiki access with Django

2012-01-23 Thread krumru...@googlemail.com
Thanx for the answer. I´ll try the wikitools package. Karsten On 23 Jan., 18:04, Brett Epps wrote: > MediaWiki has a pretty nice HTTP API that you can use to access content > stored within it.  I've used that API with the wikitools Python package > and it worked pretty well. > > Brett > > On 1/2

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread JJ Zolper
Yes I knew I was in the Python shell I just never saw anything that described you couldn't make Django commands within the Python interpreter. I mean it is based on Python isn't it? That's where I thought logically you could make Django calls from in Python? SO Is your best advice to have

Re: High cpu usage for wsgi apache processes

2012-01-23 Thread Andre Terra
Hello, Unless you tell us what your app is supposed to be doing, there's very little chance any of us can offer any real help. Cheers, AT On Mon, Jan 23, 2012 at 5:47 PM, TINO THOMAS wrote: > Hello, > > I have a Django setup on cpanel server with python 2.7, virtual env and > mod_wsgi. I can

High cpu usage for wsgi apache processes

2012-01-23 Thread TINO THOMAS
Hello, I have a Django setup on cpanel server with python 2.7, virtual env and mod_wsgi. I can see that cpu usage is high for these wsgi apache processes. Is there any way to control this behavior ? Regards Tino -- You received this message because you are subscribed to the Google Groups "Dj

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-23 Thread Petr Přikryl
I am a Django novice, so only a wild guess based on my Python knowledge...   > In the Django shell I do > > quests = Question.objects.all() > quests[579].delete() > > Why does the objects.all() invocation add this id=None crud > to quests list?   Are you sure that you have 580 items in the conta

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread JJ Zolper
For sanity purposes I removed my "hack" or start up script that had "import django" and "import IPython" Here it is: >>> import sys >>> sys.path ['c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE', 'C:\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg', 'C:\\Python2

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread Andre Terra
the >>> indicates you are IN a python shell, which is different from your OS prompt. Try exiting the shell first (with exit()) and then run "python manage.py runserver" from a command prompt or terminal window. Cheers, AT On Mon, Jan 23, 2012 at 4:11 PM, JJ Zolper wrote: > > >>> python manage.

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread JJ Zolper
Here is the error: >>> python manage.py runserver File "", line 1 python manage.py runserver ^ SyntaxError: invalid syntax >>> You've left out the most important bit - the actual traceback error. What is it? If it can't find something, then it could be a PYTHONPATH issue

Re: Mediawiki access with Django

2012-01-23 Thread Brett Epps
MediaWiki has a pretty nice HTTP API that you can use to access content stored within it. I've used that API with the wikitools Python package and it worked pretty well. Brett On 1/23/12 7:35 AM, "krumru...@googlemail.com" wrote: >Hello, > >I use mediawiki as semantic wiki for saving articles

Editing .po files for RTL languages

2012-01-23 Thread Ryan
I'm needing to translate several Django sites/apps into arabic (a Right-To-Left language) and I'm having difficulty editing the .po files when the message to translate contains Left-To-Right variables or HTML markup. Whether I'm using TextMate, TextWrangler or poedit, if I'm editing a translation

Re: Debug = false ruins template

2012-01-23 Thread Martin J. Laubach
Probably you are not serving your static files any more as the built-in staticfiles app only works in debug mode (that's a feature). mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https:

Re: How can I go about this?

2012-01-23 Thread yati sagade
Hi You should probably start off by doing some homework and studying other such systems which atleast partially implement what you want - I have done a Twiiter clone with Django/MongoDB-Mongoengine here. Then, read up on the Django comments framework

Re: Setting Network settings from Python/Django

2012-01-23 Thread yati sagade
Hi Ganesh Why do you want to do it with Django? You can go about building a light GUI in python that accomplishes your task, but, again, since you say the system's embedded, I don't know what libraries are you willing to put on it. Also, it will require the Python runtime to be installed. That said

Re: what is the best IDE to use for Python / Django

2012-01-23 Thread yati sagade
I think someone has already requested NOT to reply to this thread anymore. Please STOP replying people. On Mon, Jan 23, 2012 at 6:05 PM, Mario Gudelj wrote: > I've used gedit, sublime text 2, emacs, vi, but the best Django IDE by far > is PyCharm. I'm seriously amazed at how awesome it is. It's w

Debug = false ruins template

2012-01-23 Thread Krondaj
Hi, After going through to tutorial 3 there is a little bit about setting DEBUG = False to redirect the the 404.html. I have set this, but now the template from the tutorials (also in / admin/) has changed and is not as 'pretty' or well laid out as before. Can someone tell me what has happened

Mediawiki access with Django

2012-01-23 Thread krumru...@googlemail.com
Hello, I use mediawiki as semantic wiki for saving articles from newspapers and journals. Now I want to write a Django application for better handling all functions. Are there expiriences in this group for the access to mediawiki with Django? For the access I want to use the pywikipedia framework.

Re: what is the best IDE to use for Python / Django

2012-01-23 Thread Mario Gudelj
I've used gedit, sublime text 2, emacs, vi, but the best Django IDE by far is PyCharm. I'm seriously amazed at how awesome it is. It's worth every cent. On 23 January 2012 22:20, Sandro Dutra wrote: > The best IDE is that you fell comfortable using it. > > 2012/1/21 goosfancito : > > El 21/01/12

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-23 Thread bruno desthuilliers
On Jan 22, 12:39 am, Chris Seberino wrote: > On Jan 21, 2:43 pm, JohnA wrote: > > > How are you finding these objects?  That might point to the answer. > > > Probably the likeliest explanation is that you are creating the > > objects but not saving them. > > In the Django shell I do > > quests =

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-23 Thread bruno desthuilliers
On Jan 22, 1:34 pm, akaariai wrote: > There is still the possibility that you really have a row where the PK > is somehow null. Very unlikely given the model definition, but well, sh*t happens. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-23 Thread bruno desthuilliers
On Jan 21, 6:31 pm, Chris Seberino wrote: > On Jan 21, 6:44 am, Tom Evans wrote: > > > Models are representations of rows in a database. > > Deleting a model instance implies removing a row from a database. > > Model instances have an id attribute which denotes their row in the > > database. > >

ANN: Two-Step Authentication with Django

2012-01-23 Thread Nuno Maltez
django-twostepauth is a Django application that allows user authentication with two steps for additional security. The first step with username and password and the second step with a one-time code such as the codes generated by soft token devices like Google Authenticator. Features: * Authe

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread Sam Lai
On 23 January 2012 15:22, JJ Zolper wrote: > Hello everyone, > > I was able to install Django to my machine and before I was using the > command prompt. Django's path is in my Windows 7 64 bit Enterprise > Environment variable. Python worked fine as well too. I also installed > IPython because I h

Somebody please attend to me

2012-01-23 Thread coded kid
Please how can I get user post update, make their friends comment and share the update in django? Just like the way FB update is. I hope you get my point? Thanks so much -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Joining tables

2012-01-23 Thread Arun P
@bruno Dint know that you can do lookups from OneToOne related models Thanks On Mon, Jan 16, 2012 at 8:00 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On Jan 16, 8:04 am, Arun P wrote: > > Does this work? > > > > info = > > > ExtraInformation.objects.filter(user__is_active

Re: what is the best IDE to use for Python / Django

2012-01-23 Thread Sandro Dutra
The best IDE is that you fell comfortable using it. 2012/1/21 goosfancito : > El 21/01/12 08:52, kenneth gonsalves escribió: > >> On Sat, 2012-01-21 at 03:34 -0800, John Yeukhon Wong wrote: >>> >>> While it has been asked a trillion times already, let me say TRY UT >>> YOURSELF. >> >> you were req

Re: Confused with django model Limit and Offset Implementation

2012-01-23 Thread Daniel Roseman
On Monday, 23 January 2012 04:40:31 UTC, Swaroop Shankar wrote: > > Hi, > Am trying to create a custom pagination for my project, but am seriously > struck with the django implementation of Limit and offset. I went through > the documents, instead of making me understand how it works, i ended up