./manage.py cleanup gets killed

2012-09-07 Thread Bastian
When I try to do a ./manage.py cleanup it seems to be working for a while (a few seconds) and suddenly it stops and I receive a message on bash simply saying 'killed'. Then I tried to enter the mysql shell to see if anything had been done and at the point when I type mysql> select * from django

Re: Test driven development in Django framework

2012-09-07 Thread jyria
Thank you for reply, I have been using your tutorial to learn TDD in django. One of the best I have found so far. You also talk about "unit tests" and thats what is confusing. As I understand, your tutorial examples are not unit tests in the strict meaning of the term. You have a great tutori

Re: Error: App with label world could not be found. Are you sure your INSTALLED_APPS setting is correct?

2012-09-07 Thread Philip Mountifield
I would try importing the module from the python shell, you may have a syntax error in that module which is causing manage.py to ignore it. Try "python manage.py shell" and then do "import world" or what ever the path to your world package is. Phil On 07/09/2012 06:50, Coulson Thabo Kgathi wr

Re: Site Architecture

2012-09-07 Thread Babatunde Akinyanmi
I'm hardly a pro but I think the answer to your question will depend on why you want to add django to the stack On 9/7/12, Jeff Regan wrote: > I'm not much of an architect and am pretty new to Django, so I was hoping I > > could get some advice. Currently our site is html/jQuery and all the data

Re: How to use URL namespaces in tests?

2012-09-07 Thread e.generalov
Unfortunately in my case, no templates are used. среда, 5 сентября 2012 г., 20:37:06 UTC+6 пользователь Natim написал: > > Ok it is quite easy, you are missing {% load url from future %} in your > template. > > Le jeudi 23 août 2012 09:25:54 UTC+2, e.generalov a écrit : >> >> Url patterns which p

Re: ./manage.py cleanup gets killed

2012-09-07 Thread Tom Evans
On Fri, Sep 7, 2012 at 10:20 AM, Bastian wrote: > When I try to do a ./manage.py cleanup it seems to be working for a while (a > few seconds) and suddenly it stops and I receive a message on bash simply > saying 'killed'. Then I tried to enter the mysql shell to see if anything > had been done and

Re: ./manage.py cleanup gets killed

2012-09-07 Thread Bastian
Yes I've run out of memory, but there is approx 400MB of free memory, isn't it enough to get that task done? I have no idea how much memory it takes but it surprises me, any other query to the DB works perfectly. Cheers. On Friday, September 7, 2012 1:03:45 PM UTC+2, Tom Evans wrote: > > On Fri

Re: manually supply a connection for a model to use. (to take advantage of the ORM in i.e. long running django management command w/ gevent and thousands of greenlets)

2012-09-07 Thread Tom Evans
On Fri, Sep 7, 2012 at 3:07 AM, Benjamin Lee wrote: > Hey guys, I'm looking to manually supply a connection for a model to use. > (to take advantage of the ORM in i.e. long running django management > command). > > Basically I have some loop that is run, and only a portion of the loop > requires a

Re: How to Set Up for Apace and Mod_wsgi

2012-09-07 Thread Jon and Chiarina Blake
On 09/03/2012 04:46 PM, Michael Crawford wrote: Basically the entry in the httpd.conf file points to the dejango.wsgi file. Instead of apache/django.wsgi, point it to the location of yours. I did the same since django now creates a default wsgi file when you create the project. Those entrie

Re: How to use FTP to upload files with Django?

2012-09-07 Thread Chaney Lee
Yes.Or is there any alternative way to let user upload large files(GB) to server. 在 2012年9月6日星期四UTC+8上午2时24分21秒,Kurtis写道: > > Do you want to use FTP to serve or accept the files? > > On Wed, Sep 5, 2012 at 2:14 PM, Mando >wrote: > >> Would this work -> nginx-gridfs

Re: Test driven development in Django framework

2012-09-07 Thread Harry P
Hey, glad to hear someone's been found it useful! re: whether my unit tests are unit tests or not... some people have a very restrictive definition of what a unit test is - they want it to be 100% isolated from other tests, always mock out the filesystem and the database, etc. That's fine, but

Re: Error: App with label world could not be found. Are you sure your INSTALLED_APPS setting is correct?

2012-09-07 Thread Coulson Thabo Kgathi
Managed. there was another directory created inside the project directory name with the same name as the project directory name and it has settings file tht has 2 be used -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion

AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'

2012-09-07 Thread Coulson Thabo Kgathi
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type' i get this error when i run the command $ python manage.py sqlall world world being the app i created for the geodjango project in the geodjango toturial -- You received this message because you are subscribed to the

Re: Site Architecture

2012-09-07 Thread Jeff Regan
Thanks for the reply. I wanted to use Django for the templating engine and, in the future, some of the open source applications (commenting, graphing, and blogs for example) that were built as Django apps. Also, I like being able to build my urls. After discussing the web architecture with one o

Re: Site Architecture

2012-09-07 Thread Kurtis Mullins
I would recommend not using Django to consume services over a network without intensive caching and safe-guards just due to the fact that it will hold up the connection when a user tries to access a page. Importing your existing project into Django (as opposed to accessing it through an API) would

Re: Site Architecture

2012-09-07 Thread Tom Evans
On Fri, Sep 7, 2012 at 4:19 PM, Kurtis Mullins wrote: > I would recommend not using Django to consume services over a network > without intensive caching and safe-guards just due to the fact that it will > hold up the connection when a user tries to access a page. Importing your > existing project

Seeing if a variable value is within a dictionary key value within a list of dictionaries

2012-09-07 Thread Jason
Hi there, I'm using django 1.2 and am attempting to get the following code to work. private_folder_details = [{"folderId":"", "name": "The folder name"},{"folderId":"1221", "name": "The other folder name"}] private_folders = [{"id":""},{"id":""}] {% for folder in private_folders %}

Re: Site Architecture

2012-09-07 Thread Kurtis Mullins
Tom, I agree with you. If it's done right, it can be a very valuable design. I believe Amazon, internally, is setup in a similar fashion; everything is a service. They're obviously doing pretty well. However, if it's not done right, then it's easy to run into large problems. Just as a tiny and pr

Re: How to make my custom AdminSite class use my custom login/logout views?

2012-09-07 Thread tanderegg
Did you create your custom class by inheriting from AdminSite? If so, couldn't you just override the login and logout methods in your inherited class? Or, perhaps override get_urls if you need to modify the url patterns themselves? -Tim On Thursday, September 6, 2012 10:13:01 AM UTC-4, Stodg

Re: AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'

2012-09-07 Thread tanderegg
Sounds like your database is not set to use postgis, are you using this: django.contrib.gis.db.backends.postgis as the database backend (i.e in settings.py, for the DATABASE variable, and the 'ENGINE' setting instead of psycogb2)? -Tim On Friday, September 7, 2012 9:25:22 AM UTC-4, Coulson Tha

Virtualenv changes url reverse behaviour

2012-09-07 Thread William Hart
Hi all, I've made a post on stack overflow, but I'm not sure if this is some kind of weird bug or just something silly I'm doing. (see http://stackoverflow.com/questions/12310608/running-virtualenv-on-django-app-kills-my-urls). Basically I have an existing app with working urls set up like

Re: Seeing if a variable value is within a dictionary key value within a list of dictionaries

2012-09-07 Thread Tim Chase
On 09/07/12 13:06, Jason wrote: > I'm using django 1.2 and am attempting to get the following code to work. > > private_folder_details = [{"folderId":"", "name": "The folder > name"},{"folderId":"1221", "name": "The other folder name"}] > private_folders = [{"id":""},{"id":""}] > > {

Re: Seeing if a variable value is within a dictionary key value within a list of dictionaries

2012-09-07 Thread Craig Amundsen
{% if folder.id in private_folder_details.values() %} should do the trick On Fri, Sep 7, 2012 at 11:06 AM, Jason <1jason.whatf...@gmail.com> wrote: > Hi there, > > I'm using django 1.2 and am attempting to get the following code to work. > > private_folder_details = [{"folderId":"", "name": "

Re: Seeing if a variable value is within a dictionary key value within a list of dictionaries

2012-09-07 Thread Jason Whatford
Hi Craig, thanks for the response. I'm using django 1.2 for templating and webapp2 to handle the requests on appengine. I've tried your suggestion of {% if folder.id in private_folder_details.values() %} as well as {% if folder.id in private_folder_details.values %} But it prevents page loading

Re: Step up to the plate

2012-09-07 Thread Christopher Downard
Alex, I'd love to get involved. christopherdown...@gmail.com or ch...@bluesuntechnologies.com -Christopher Downard On Thu, Sep 6, 2012 at 4:32 PM, Steven Elliott wrote: > Hi alex > > I'm down as well email me at srichardelliot...@gmail.com > On Sep 6, 2012 6:28 PM, "andrea mucci" wrote: > >>

Re: error in the "Writing your first Django app, part 2"

2012-09-07 Thread Maheshakya Wijewardena
thanks official version did the job On Friday, September 7, 2012 8:32:55 AM UTC+5:30, Melvyn Sopacua wrote: > > You're using development version of Django. Python 2.5 support is dropped > there. Use official 1.4 release. > -- You received this message because you are subscribed to the Google Gr

Re: Seeing if a variable value is within a dictionary key value within a list of dictionaries

2012-09-07 Thread Craig Amundsen
I see it now. private_datails is not a dictionary. It's a list of dictionaries where each dict has one key-value pair. How about this: private_ids = [x.values()[0] for x in private_details] if folder.id in private_ids or if you want it one line: if folder.id in [x.values()[0] for x in private_de

Re: Virtualenv changes url reverse behaviour

2012-09-07 Thread Bill Freeman
Are you certain that you don't have an absolute path lurking somewhere in your code? On Fri, Sep 7, 2012 at 3:36 PM, William Hart wrote: > Hi all, > I've made a post on stack overflow, but I'm not sure if this is some kind of > weird bug or just something silly I'm doing. (see > http://stackover

Re: Seeing if a variable value is within a dictionary key value within a list of dictionaries

2012-09-07 Thread Tim Chase
On 09/07/12 16:06, Jason Whatford wrote: > P.s. Tim, my data structure isn't that malleable. It's > essentially I query my appengine datastore, and that retrieves a > list of the data models, each of which can be treated as a dict. > The dicts are used in a few different ways in the view - only > t

Re: Virtualenv changes url reverse behaviour

2012-09-07 Thread William Hart
Hi, Thanks for the reply. Yes I'm fairly certain their are no absolute paths - the settings paths are all built up using os.path, and there are no paths elsewhere in the document. Basically as far as I can tell what is happening is that the url name for {% url 'dashboard' %} is interprete

Re: Virtualenv changes url reverse behaviour

2012-09-07 Thread Bill Freeman
Have you tried it without the quotes? None of the examples in the docs (https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#url) use quotes. (Which, in turn, probably means that you can't use a variable there.) On Fri, Sep 7, 2012 at 7:46 PM, William Hart wrote: > Hi, > Thanks for the

Re: Virtualenv changes url reverse behaviour

2012-09-07 Thread William Hart
Hi, Yes as per my first and second replies and the SO link I have done it with and without quotes. To be clear - this is not a 'fix my code' question as I had already found the workaround before posting, the question is more whether it is expected behaviour for the {% url %} tag to act differ

Re: Virtualenv changes url reverse behaviour

2012-09-07 Thread Ramiro Morales
On Fri, Sep 7, 2012 at 9:21 PM, William Hart wrote: > Hi, > Yes as per my first and second replies and the SO link I have done it with > and without quotes. > > To be clear - this is not a 'fix my code' question as I had already found > the workaround before posting, the question is more whether i

Re: Virtualenv changes url reverse behaviour

2012-09-07 Thread Aaron C. de Bruyn
On Fri, Sep 7, 2012 at 12:36 PM, William Hart wrote: > And used in templates like so: > {% url 'dashboard' %} If you want to use quotes, put: {% load url from future %} at the top of your template. Newer versions of Djagno WILL eventually require quotes, and using the 'load url from future' line

Re: Announcement of GUI for Creating Models

2012-09-07 Thread Alec Taylor
Suggestion: go visual E.g.: fork this - http://gaesql.appspot.com/ On Sat, Sep 8, 2012 at 12:42 PM, Timothy Clemans wrote: > I've developed a GUI for creating models, see > https://github.com/timothyclemans/django-admin-models-editor > > Would this be helpful for developers? Would it be useful f

Re: Announcement of GUI for Creating Models

2012-09-07 Thread graeme
On Saturday, September 8, 2012 8:16:18 AM UTC+5:30, Alec Taylor wrote: > > Suggestion: go visual > > E.g.: fork this - http://gaesql.appspot.com/ > This already seems to do that: http://code.google.com/p/uml-to-django/ I have not tried it: I am put off by the way it splits models.py and adm

Re: Development server won't work from a shared web host

2012-09-07 Thread graeme
On Tuesday, September 4, 2012 11:43:53 AM UTC+5:30, Daniel Roseman wrote: > > On Tuesday, 4 September 2012 03:32:08 UTC+1, ecs1749 wrote: >> >> Thanks for the reply. Yes, I saw that message. I am a bit lost where to >> go next if I completely ignore that tutorial regarding doing admin from the

Re: Development server won't work from a shared web host

2012-09-07 Thread graeme
On Friday, September 7, 2012 8:38:56 AM UTC+5:30, ecs1749 wrote: > > Well, that's almost true :-) > > Granted - it's a lot easier so far but I had to track down several things > (and a whole lot of "here's how" tips) that were taken for granted (like > pip which require easy_install so on a