simplest solution to embed django server into an existing application.

2014-06-09 Thread Gelonida N
Hi, I know, that ./manage.py runserver is not considered being secure. In my context this doesn't matter. What matters in my context is following: - start a python process - start at any time later on demand a web server - this server shall serve django contents and shall have full read / write

Re: Running Shell script to run Django shell and then scp files to server...

2012-10-02 Thread Gelonida N
On 10/02/2012 04:47 PM, Tom Evans wrote: On Tue, Oct 2, 2012 at 3:09 PM, Chris McComas wrote: I have a script in Django that I run manually 'python manage.py shell' and then 'from sports import scores' and it goes out and pulls scores from a couple URLs, modifies the data, and saves it to a SQL

adding a database (anda table with its model) on the fly

2012-09-16 Thread Gelonida N
I wondered whether there would be any way to add a new model and a new database without having to stop my processes. I can imagine multiple use cases, where this could be intersting. One use case would be for example a graphical application: - The user would select a sqlite file or perhaps a

Re: how to let user change the language

2012-08-13 Thread Gelonida N
On 08/13/2012 12:09 PM, Marcin Tustin wrote: This list is not here to find pages in the documentation for you. The documentation has a contents page, and search. Thank you very much for your help. -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: how to let user change the language

2012-08-13 Thread Gelonida N
l tyr that one out. On 08/13/2012 12:54 AM, Marcin Tustin wrote: So, what part, exactly is a problem? What have you tried? On Sun, Aug 12, 2012 at 6:52 PM, Gelonida N mailto:gelon...@gmail.com>> wrote: On 08/12/2012 08:46 PM, Marcin Tustin wrote: This is linked from the D

Re: how to let user change the language

2012-08-13 Thread Gelonida N
, that changing settings.LANGUAGE_CODE allows to change the language site wise. So there must be some other doc explaining more. On Sun, Aug 12, 2012 at 6:52 PM, Gelonida N mailto:gelon...@gmail.com>> wrote: On 08/12/2012 08:46 PM, Marcin Tustin wrote: This is linked from the Django fron

Re: how to let user change the language

2012-08-12 Thread Gelonida N
12, 2012 at 1:10 PM, Gelonida N mailto:gelon...@gmail.com>> wrote: I'd like to have a web site, where the can switch the language The first time the user connects the language would be the prefered language as sugegsted by the news agent, then the user could select the

how to let user change the language

2012-08-12 Thread Gelonida N
I'd like to have a web site, where the can switch the language The first time the user connects the language would be the prefered language as sugegsted by the news agent, then the user could select the prefered lanngauge in some user preference settings. What would be the standard way to d

Re: I can not install Django on Windows7

2012-07-22 Thread Gelonida N
On 07/18/2012 02:50 PM, Владислав Иванов wrote: when I run the installation of Django python setup.py install - comes at the end of an error that can not be put Django in C: \ Python27 \ Lib \ site-packages -- You received this message because you are subscribed to the Google Groups "Django user

Recommended middleware /tools.tips for profiling a django server

2012-07-11 Thread Gelonida N
Hi, I'm having a nginx / uwsgi / django server and wanted to get some profiling data to identify bottle necks learn more about where time is consumed (80% dynamic difficult to cache contents, so don't worry too much about serving static contents) In this question I'm mostly interested in dja

decorating an include in urls.py

2012-07-06 Thread Gelonida N
I'd like to decorate all views in an include. Let's take for example: urlpatterns = patterns('', url(r'^decorated_admin/', include(admin.site.urls)), ) Is there any way to decorate all views in admin.site.urls I was looking for a syntax similiar to: urlpatterns = patterns('', url(r'^

Re: setting up new django project

2012-06-21 Thread Gelonida N
On 05/28/2012 04:53 AM, xaegis wrote: Hello, this is my first time posting to a list! I am running python 2.7 with django 1.4 installed on Ubuntu 12.04 I am having trouble creating new projects with django. Whenever I use the command: Code: sudo /usr/local/lib/python2.7/dist-packages/django/bi

Re: DRY violation using get_or_create with defaults

2012-06-12 Thread Gelonida N
On 06/12/2012 05:44 AM, Jerome Baum wrote: Drop the "defaults" kwarg to get_or_create as apparently you're not using it. Also drop the conditional on those set/save statements. Wouldn't this create more db accesses than the original code? On Monday, June 11, 2012 3:44:47 PM UTC+2, ojno wrot

Is there anything like 'static' templates

2012-06-09 Thread Gelonida N
Hi, This is mostly out of curiousity. Let's imagine a site containing mostly static HTML files. However due to laziness / ease of changing the overall sites layout and the option of using django compressor for the included .css .js files I wondered how I could use templates and still serve the

Re: Tutorial database problem

2012-05-28 Thread Gelonida N
On 05/27/2012 05:38 AM, phantom21 wrote: I've tried to set up the database as sqlite3. I keep getting an error on the ENGINE line, but can't figure out why as it looks correct. Here is the database section: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3',

anybody used Jython 2.5+ and Django

2012-05-27 Thread Gelonida N
Did anybody play with this? What versions of django are supported? What DB engines are supported? Any performance comparison between Cpython and Jython? Thanks in advance for pointers / comments Any hints on how to create such a setup on Ubuntu 12.04? -- You received this message because

can the Django test server serve cgi scripts?

2012-05-13 Thread Gelonida N
I know, that performance would be entire crap. However sometimes this could be useful for a minimalist setup. So let me explain: For testing I'd like start no web server at all, just the django test server. (./manage.py ./runserver ) It will handle all static files and all django views. Now

Django unit test. Access the 'real data base'

2012-05-11 Thread Gelonida
For one unit test I would like to use the real data base and not the test data base. Basically this unit test shall verify that the server database fulfills certain consistency criterea. How can I write one django test, that uses the 'default' (non test database) I tried to use Model.object

Re: Can't access database with normal Ubuntu Terminal user

2012-04-18 Thread Gelonida N
Not sure if this helps you. I had to create the file ~/.pgpass in the home directory of my developers account. I repeated there the data base name, the user name and the password for my database. Example: localhost:*:db_name:username:password Afterwards I was able to access the db with ./ma

Re: Logging works from 'manage.py shell', not from app

2012-04-18 Thread Gelonida N
On 04/13/2012 07:41 PM, Jeff Blaine wrote: > Hi all. I'm stumped on something. Using logging via 'manage.py shell' is > working as expected. Using it in the webapp generates zero data and > zero errors. I'm not sure whether this is your problem, but please note, that logging to a log file is not a

Re: Simplest way to get all models for which admin interface exists

2012-03-15 Thread Gelonida N
Thanks a lot Matt, On 03/15/2012 03:20 AM, Matt Schinckel wrote: > All installed ModelAdmin models: > from django.contrib.admin import site site._registry.keys() > > If you only got at this from `manage.py shell`, then you may need to > import your urls.py file first. > > Getting thos

Re: How to disable re-POST via F-5

2012-03-14 Thread Gelonida N
On 03/15/2012 12:35 AM, Russell Keith-Magee wrote: > > On 15/03/2012, at 5:32 AM, Gelonida N wrote: > >> Hi, >> >> I'm having a django view, that works for GET and POST requests. >> >> Basically une can view some data with GET >> and add / moif

Simplest way to get all models for which admin interface exists

2012-03-14 Thread Gelonida N
Hi, Title says it all. What is the simplest way to get a list of models for which an admin interface exists? I'd also be interested in getting a list of all models for which no admin interface exists. -- You received this message because you are subscribed to the Google Groups "Django users"

How to disable re-POST via F-5

2012-03-14 Thread Gelonida N
Hi, I'm having a django view, that works for GET and POST requests. Basically une can view some data with GET and add / moify data with a tiny form and POST As the data can change I added a refresh button and this works fine. The problem is just, that some users don't use it but insist on using

django admin templates: filter hides table contents

2012-02-13 Thread Gelonida N
Hi, I wanted to know whether anybody modified the django admin templates such, that the filter div could be hidden. At the moment the containing the filters may hide the contents of the table. As I can imagine, that I'm not the only one who might have large tables and doesn't like, that part

Re: Website Statistics - What should I use to have Google Analytics in Django?

2011-12-01 Thread Gelonida N
On 11/30/2011 09:25 PM, Andre Lopes wrote: > Hi, > > I need to track visitors with Google Analytics. What should I use to > get Google Analytics working on Django? > > What is my best choice? > > Best Regards, > Out of curiousity: Is there anything similiar which does work well in an intrane

Re: Fixture migrations using South?

2011-12-01 Thread Gelonida N
On 11/30/2011 06:26 PM, Jeremy Dunck wrote: > I have some test fixtures with scenarios under test. Later, I need to > migrate (with South) the DB schema around, which of cours necessitates > changing domain and test code. > > A common problem I run into, though, is that I also need to migrate > t

unit tests and 'system' tests with history

2011-11-30 Thread Gelonida N
I started implementing tests for my django application. I anticipate two kind of tests: 1.) Unit tests --- The unit tests should be as the uni tests are implemented in django. They should be 'atomic' independent, could be executed in any order and should always yield the same resu

Re: django tests. where to create users

2011-11-30 Thread Gelonida N
I create this object, either in > test or the setUp. > > On 11/28/11 01:58, Gelonida N wrote: >> Hi, >> >> I'd like to run some django tests, which use the test client and which >> should check, that certain users can only access certain contents. >> >&

Re: django tests. where to create users

2011-11-30 Thread Gelonida N
On 11/29/2011 11:45 AM, Tom Christie wrote: > What's wrong with just creating them in the .setUp()? > > Don't sweat the small amount of time it'll take to re-create the users > on each test run, it's almost certainly not worth worrying about. > Well this is what I'm doing at the moment. And I th

Re: Simple task dispatching (How heavy is celery + RabbitMQ)

2011-11-28 Thread Gelonida N
On 11/28/2011 12:14 PM, Gelonida N wrote: > Hi, > > I'd like to use a light weight dispatching system for a web server. > > Basically some django post requests might require processing, which > should be done in the back ground due to its run times. > > The results

Re: django tests. where to create users

2011-11-28 Thread Gelonida N
On 11/28/2011 01:58 AM, Gelonida N wrote: > Hi, > > I'd like to run some django tests, which use the test client and which > should check, that certain users can only access certain contents. > > Where would you create this users / passwords. > - With a fixture > - a

Simple task dispatching (How heavy is celery + RabbitMQ)

2011-11-28 Thread Gelonida N
Hi, I'd like to use a light weight dispatching system for a web server. Basically some django post requests might require processing, which should be done in the back ground due to its run times. The results would be added to the django data base. The browser could verify via AJAX requests whet

Re: django testing. random test order with some 'dependency constraints'

2011-11-28 Thread Gelonida N
Hi Russel, Thanks for your answer. On 11/28/2011 04:12 AM, Russell Keith-Magee wrote: > On Mon, Nov 28, 2011 at 9:39 AM, Gelonida N wrote: > . . . > Unit tests are supposed to be isolated. They shouldn't depend on > execution order, or have any pre-requisite other than tho

django testing. random test order with some 'dependency constraints'

2011-11-27 Thread Gelonida N
I'd like to create some unit tests whch should be executed in random order. However some tests could benefit from results of some predecessor tests. Therefore they should be executed only after certain tests. Did anybody try to implement such a test setup with Django's default unit tests? Are

django tests. where to create users

2011-11-27 Thread Gelonida N
Hi, I'd like to run some django tests, which use the test client and which should check, that certain users can only access certain contents. Where would you create this users / passwords. - With a fixture - as part of a test class in the SetUp section and tear it down afterwards? - create

Re: django testing with postgres without permissions to create databases

2011-11-26 Thread Gelonida N
On 11/26/2011 01:23 AM, Gelonida N wrote: > It seems I'm not the first one who wans to run django tests with > postgressql and who doesn't have permissions to create databases. > > I found two suggestions on the web: > > One is to use sqlite for testing instead of

Re: disabling south for running tests

2011-11-26 Thread Gelonida N
Hi Chris, Thanks a lot. On 11/26/2011 09:51 AM, Chris Northwood wrote: > On 25 November 2011 23:59, Gelonida N wrote: >> As for testing the database is created from scratch and as migrations >> are not really needed in this case I decided to disable south for >> runnin

django testing with postgres without permissions to create databases

2011-11-25 Thread Gelonida N
It seems I'm not the first one who wans to run django tests with postgressql and who doesn't have permissions to create databases. I found two suggestions on the web: One is to use sqlite for testing instead of postgres. However I'm not really happy with this solution, as sqlite is less sensiti

disabling south for running tests

2011-11-25 Thread Gelonida N
Hi, I just started my first experimets wit running django tests and encountered several issues. One of the issues is related to south. If I want to run single short tests. then I spend more time creating the database than I need to run the tests. The database creation time is especially high

django 1.3 and django-test-utils Persistent Database Test Runner

2011-11-25 Thread Gelonida N
I just discovered django-test-utils on the web and noticed, that it has some functionality, that looks interesting to me. http://readthedocs.org/docs/django-test-utils/en/latest/keep_database_runner.html# this shall introduce a management command 'quicktest', which is supposed to keep the test dat

Re: django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Gelonida N
Hi Mike, Yes this idea is simple enough. I just wondered whether there isn't a tiny risk of finding 'test' as a paramter of one of the option in some esotheric cases. For what I am doing the solution should be absolutely fine. With my habit of using ./manage.py I could even change it to if sys.

django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Gelonida N
Hi, I just started reading about django testing. Now I have a small question. Whe running tests I would like to change a few variables in settings.py, but keep all the rest identical. Example: - I might like ot change the media directory - I might like to use another db engine How can I achie

Re: copy entire data base to another host

2011-11-20 Thread Gelonida N
th permissions 600 and store the user/password in it and specify it on the command line with --defaults-file=tmp_my.cnf However as I don't use postgres that much I don't know whether postgres can do the same (specify a non default config file) > > On Nov 20, 2011, at 19:09 , G

Re: copy entire data base to another host

2011-11-20 Thread Gelonida N
On 11/20/2011 06:37 PM, Gelonida N wrote: > Hi, > > I for debugging purposes I'd like to clone the data base of one machine > to another one. (both are not necessarily using the same data base engine) > > What would be the suggested procedure? > > What I tried,

copy entire data base to another host

2011-11-20 Thread Gelonida N
Hi, I for debugging purposes I'd like to clone the data base of one machine to another one. (both are not necessarily using the same data base engine) What would be the suggested procedure? What I tried, but what failed is following: 1.) On the remote machine ./manage.py dumpdata > dumpall.json

will an empty middleware class consume any time (except during initial import?)

2011-11-19 Thread Gelonida N
Just out of curiousity, Let's assume I add a middleware in settings.MIDDLEWARE_CLASSES and the middleware class is empty. (just a pass statement) Will it consume any CPU time while handling a request? To rephrase my question. Is it at startup, that Django checks which methods a middleware impl

Re: logging django errors also on the server

2011-11-19 Thread Gelonida N
On 11/19/2011 10:26 PM, Gelonida N wrote: > On 09/05/2011 12:58 AM, Gelonida N wrote: >> >> Im am debugging a django application. >> >> If I set DEBUG=True >> then I can see error messages on the browser. >> >> Is there any way to see the same error me

Re: logging django errors also on the server

2011-11-19 Thread Gelonida N
ch more than I really want to use. I'm just looking for a trick to capture the django exceptions and send the related backtraces to stdout (or a log file) (which will be stored in a log file) > On Sep 5, 12:58 am, Gelonida N wrote: >> Hi, >> >> Im am debugging a dja

Re: logging django errors also on the server

2011-11-19 Thread Gelonida N
On 09/05/2011 12:58 AM, Gelonida N wrote: > Hi, > > Im am debugging a django application. > > If I set DEBUG=True > then I can see error messages on the browser. > > Is there any way to see the same error messages in the server log file? > Occasionally (especi

a class that defines __slots__ without defining __getstate__ cannot be pickled

2011-11-13 Thread Gelonida N
Hi, I have now an error message showing up when accessing the django admin interface for some of my models. Fails already at the front page The main problem, that I have is, that the stack trace does not relate to any line of my code, so I'm alittle at a loss how to fix it. The stack trace is:

include() combined with login_required()

2011-11-13 Thread Gelonida N
Hi, I wondered whether (and if yes how) I can combine login_required and include() in my urls.py file Basically I'd like to require login for every url belonging to a certain application. currently urls.py looks like: from django.conf.urls.defaults import patterns, include, url from django.

Re: maultiple .js files for debug and one minimized .js for production

2011-11-10 Thread Gelonida N
On 11/08/2011 07:37 PM, Fabian Ezequiel Gallina wrote: > 2011/11/8 Andres Reyes mailto:armo...@gmail.com>> > > I've been using django-compressor and totally recommend it > > > https://github.com/mintchaos/django_compressor > > > > I second that, works like charm and I really like the

maultiple .js files for debug and one minimized .js for production

2011-11-08 Thread Gelonida N
Hi, I'm having an rather weak (CPU) server accesible over a rather slow network. Therfore my plan is to use multiple readable debuggable css files for debugging and a single, minizmized .js for for production. This will affect some of my templates. How do you handle this setup in your projec

Re: Disable debugging for all, but allow debug toolbar for one host

2011-11-07 Thread Gelonida N
On 11/07/2011 12:49 PM, Tom Evans wrote: > On Sun, Nov 6, 2011 at 12:30 AM, Gelonida N wrote: >> Hi, >> >> If I understood well, then the Django debug toolbar is only working if >> debugging is enabled. >> >> What I wanted to do is is to disable the explic

Re: synchronize django admin interface password with other application passwords

2011-11-06 Thread Gelonida N
Hi Mike, On 11/07/2011 12:15 AM, Mike Dewhirst wrote: > On 7/11/2011 7:43am, Gelonida N wrote: >> >> What would be the easiest way to hook into the password modification >> form, such, that I can calculate two password hashes with different >> salts / alorithms?

synchronize django admin interface password with other application passwords

2011-11-06 Thread Gelonida N
Hi, I would like to use the django admin interface for authentification of a web site. However I also have to store a password hash (different algorith / different salt) for another application, such, that both applications can use the same password. What would be the easiest way to hook into the

Disable debugging for all, but allow debug toolbar for one host

2011-11-05 Thread Gelonida N
Hi, If I understood well, then the Django debug toolbar is only working if debugging is enabled. What I wanted to do is is to disable the explicit django error messages for all but one specific IP address and to disable the django debug toolbar for this one address. -- You received this messag

Re: can't get STATICFILES to work (Django dev version)

2011-10-03 Thread Gelonida N
On 09/26/2011 10:21 PM, nara wrote: > I am having trouble getting STATICFILES to work. I have read the docs, > and followed the instructions, but I never get my css files to load. > My current workaround is to put all the css inline in my template > file, but that should not be a permanent solution

Re: Python Weekly

2011-09-26 Thread Gelonida N
On 09/26/2011 07:43 PM, Rahul wrote: > Hi Everyone, > > I have started a free weekly newsletter called Python Weekly which > includes curated news, articles, new releases, software & tools, > events, jobs etc about Python and related technologies. It's a great > way to keep abreast of what's happe

Re: Https with runserver

2011-09-14 Thread Gelonida N
On 09/15/2011 01:44 AM, Russell Keith-Magee wrote: > 2011/9/14 Simon Bächler : >> Any news considering HTTPS and runserver? > > What "News" are you expecting? > > The Django project has made no secret of the fact that we don't > consider runserver to be a "real" webserver. It isn't intended for >

Re: logging django errors also on the server

2011-09-05 Thread Gelonida N
On 09/05/2011 03:05 AM, Reinout van Rees wrote: > On 05-09-11 02:25, Gelonida N wrote: >> I see my own log traces. >> In many situations I do see error messages in the log output. > > An important thing that's not mentioned too clearly in Django 1.3's > loggi

Re: logging django errors also on the server

2011-09-04 Thread Gelonida N
On 09/05/2011 02:03 AM, Reinout van Rees wrote: > On 05-09-11 00:58, Gelonida N wrote: >> Im am debugging a django application. >> >> If I set DEBUG=True >> then I can see error messages on the browser. >> >> Is there any way to see the same error messages

logging django errors also on the server

2011-09-04 Thread Gelonida N
Hi, Im am debugging a django application. If I set DEBUG=True then I can see error messages on the browser. Is there any way to see the same error messages in the server log file? Occasionally (especially for rpc client or Ajax requests I would prefer looking at the log file instead of looking

Re: Django 1.3 logging not working as I'd expect

2011-08-27 Thread Gelonida N
you had to force the evaluation of settings.py before creating a logger. > > > Gelonida N wrote: >> >> On 08/28/2011 12:00 AM, Scott Danzig wrote: >>> >>> >>> Gelonida N wrote: >>>> So before your three lines: >>>>> impo

Re: ipython 0.11 with django 1.3 /in virtualenv

2011-08-27 Thread Gelonida N
Hi Shawn, On 08/28/2011 02:49 AM, Shawn Milochik wrote: > If iPython is installed it should be used automatically in Django's > manage.py shell. > Apologies. I think I didn't express myself well enough. ipython is being used bydjango. What I just don't understand is why ipython does not import m

why is settings.py executed twice?

2011-08-27 Thread Gelonida N
Hi, This is also one of the things (I just started using django, so I have still quite many questions) , that I don't really understand. It doesn't break anything and I am not stuck. I'd just like to understand. $ django-admin startproject settings_twice $ echo 'print "SOMETEXT"' >> settings.p

ipython 0.11 with django 1.3 /in virtualenv

2011-08-27 Thread Gelonida N
Hi, I am having issues with ipythin when I run ./manage.py shell then ipython_config.py doesn't seem to be executed. On the other hand if I run ipython directly the file is imported. Am I missing something? My setup: $ find ~/.config/ipython/ /home/gelonida/.config/ipython/ /home/gel

Re: Django 1.3 logging not working as I'd expect

2011-08-27 Thread Gelonida N
On 08/28/2011 12:00 AM, Scott Danzig wrote: > > > Gelonida N wrote: >> So before your three lines: >>> import logging >>> logger = logging.getLogger('otherlogger') >>> logger.warn('hello') >> you had to be sure, that the d

Re: Combining queries? A "join" in Python?

2011-08-27 Thread Gelonida N
On 08/27/2011 11:39 AM, graeme wrote: > I have a some models related link this: > > A has a foreign key on B which has a foreign key on C > > I also have D with a foreign key on B, and E with a foreign key of C > > If I do A.filter(**args).select_related() I will get all the As, Bs, > and Cs I w

Re: can django be used in destop application?

2011-08-24 Thread Gelonida N
> Curious concept, using Django for a desktop application. > > Can't think of any reason why you couldn't at least try it :) > > Cal > > Original poster was rather clear I think, > > it seems its orm can be used in destop application, isn't it? It could make sense to use Django orms, because

Re: How to make an app independent on a specific site?

2011-08-24 Thread Gelonida N
On 08/24/2011 08:15 AM, Praveen Krishna R wrote: > *Even if you write > > from models import Publisher, Book, Author > > its gonna work, inside the books application; > * > On Wed, Aug 24, 2011 at 7:09 AM, Jim > wrote: > It will be working, but I personally don't l

syntax highlighting for template files and file suffix

2011-08-23 Thread Gelonida N
Hi, I'm rather new to Django and just start working with a little more with templates. I wondered how to make a distinction between html files and html templates. Shall I used different suffixes or is the directory location enough. If I don't have different file suffixes, how do you teach your

Re: Django 1.3 logging not working as I'd expect

2011-08-22 Thread Gelonida N
On 08/20/2011 06:51 AM, Scott Danzig wrote: > I have Django 1.3 working with Python 2.7 and MySQL 5.5 on Mac OSX Lion... > > I'm betting I'm missing something straight forward, but: > > I have a simple Django app in development that uses a dictConfig setting > simpler than the default in settings

Re: Django beginner question

2011-08-21 Thread Gelonida N
On 08/21/2011 03:25 AM, Christian Ramsey wrote: > Hi and thank you so much, this provided a ton of clarity, especially > the modelling of the order table with a foreign key to a user, I was > locked on thinking the user table needed to somehow have the orders > within it. But I see I needed to ste

Re: Django beginner question

2011-08-20 Thread Gelonida N
On 08/21/2011 12:56 AM, Christian Ramsey wrote: > Hi I am a Django beginner and I am just getting into creating apps > with it, my goal was to create a simple > order application for practice. The app will be somewhat like this: > > 1.A user will login or create an account. > 2.A user will order f

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread Gelonida N
How many different users are connected at the same time? Would it be feasable to start one django prcoess for each connected user? On 08/18/2011 11:55 AM, michael kapelko wrote: > I think I have to emulate Delphi app with a server process, and make > Django interact with the process. The process

Re: RPC for python functions in a Django project

2011-08-17 Thread Gelonida N
Hi Muhammad, On 08/17/2011 08:18 PM, Muhammad Choudry wrote: > I've > found that JSON-RPC is a good way to go for this, as there is > typically built in support for this in javascript in addition to the > numerous additional benefits. > > I've seen several ways to do this: > 1) Create a unique

Re: Django, Json and Android

2011-08-12 Thread Gelonida N
On 08/12/2011 03:13 AM, Kevin Anthony wrote: > i'm trying to interface a django json page with an android application. > it seems most json applications written for android use > www.somepage.com/json.php?this=that&something=anotherthing > > But that doesn't work with django, > > Has anyone inter

Re: "Great circle" using the django ORM?

2011-08-11 Thread Gelonida N
Databases with ordinary indexes are rather bad with finding something nearby. Thus some DB engines implemented rtree indexes (Look for example at http://www.sqlite.org/rtree.html ) or similiar kind of indexes allowing to locate objects within a certain latitude / longitude range.witt much less eff

Re: "Great circle" using the django ORM?

2011-08-11 Thread Gelonida N
On 08/11/2011 06:43 PM, Thomas Orozco wrote: > The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) Try the formula close to the poles and you notice that there is something missing. Your formula is correct on a flat surface but (there you talk about x and y and not about lattitude and long

Re: dull look after install on ubuntu

2011-08-11 Thread Gelonida N
Hi Peter, On 08/11/2011 06:40 AM, Peter Kovgan wrote: > Why , for example, collectstatic copied not static content? > > > example, /home/peter/work/django/projects/src/mysite/polls/ - it's all > new project file, there were no statics yet > > > See there: > > > Copying > '/usr/local/lib/pyth

Re: dull look after install on ubuntu

2011-08-10 Thread Gelonida N
On 08/10/2011 09:01 PM, Peter Kovgan wrote: > Ok, Ok, I've got it, read docs. > > But why It must be so complex? > Why default admin statics become unavailable, if you use another server > and not that of development: "runner"? > > Should it mean, that I must find elsewhere my admin statics, copy

Re: dull look after install on ubuntu

2011-08-10 Thread Gelonida N
On 08/10/2011 04:53 AM, Peter Kovgan wrote: > Thank you guys. > > I use development server of django(manage.py runserver). > > I created an app. from the official site of the django, this one of the > first tutorial. > > I did it on windows installation. > > Then I came home, installed the same

Re: dull look after install on ubuntu

2011-08-09 Thread Gelonida N
On 08/09/2011 09:58 PM, Peter Kovgan wrote: > django 1.3 > on python 2.7.1 > ubuntu 11.04 > looking through firefox 4 > > Dull look, like all javascript has been removed > On windows looks nice, but here all works, but no colors, no styles, > nothing... > > What could it be? Well you don't real

Re: Tutorial: New class based generic views

2011-08-09 Thread Gelonida N
On 08/09/2011 03:33 PM, Juan Pablo Romero Méndez wrote: > Hey guys, > > This is the first part of a series of blog posts I'm writing about > class based generic views: > > http://pseudocorta.blogspot.com/2011/08/django-generic-views.html > > Cheers! > > Juan Pablo > Hi Juan, This blog looks

force reading of django.settings (and thus logging)

2011-08-06 Thread Gelonida N
Hi, I have a small question: I use settings.py:LOGGING in order to configure my logging Now I'd like to add some log traces during the import phase of a module using django Example: import logging logger = logging.getLogger('mymodule') logger.INFO('created logger') import django.db logger.I

Nested: transaction.commit_on_success and django 1.3

2011-07-28 Thread Gelonida N
Hi, I have a specific function with an transaction.commit_on_success @transaction.commit_on_success def f1(): with transaction.commit_on_success: do_stuff() change_model_data_1 . . ,\. and I have now another function def f2(): change_other_model_data() f1() Now I would

Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Gelonida N
On 07/27/2011 11:26 AM, bruno desthuilliers wrote: > > > On Jul 27, 10:04 am, Uros Trebec wrote: >> Hi, >> >> for your DB migration problem you should take a look at South[0]. > > +1 > > I've just started using it and wonder why I spent so much time doing > things the painfull and error-prone

Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Gelonida N
Thanks a lot everybody. Will look into south.. On 07/27/2011 10:04 AM, Uros Trebec wrote: > Hi, > > for your DB migration problem you should take a look at South[0]. > As for your 'under maintenance' step you will have to do that manually > or use some kind of a tool to automate it, as well as

any recipes for 'live' updating a site with model changes

2011-07-26 Thread Gelonida N
Hi, Let's imagine I have a web server running with a Django application. Now I want to install an update (with a modified model) Is there any recommended way to upgrade such a server? Are there any tools helping with such upgrades or with creating upgrade scripts? If I had to do it 'manually' t

Re: too many queries: populate template from model foreign key lookup

2011-07-24 Thread Gelonida N
Hi Mark, On 07/24/2011 10:15 AM, Marc Aymerich wrote: > > > On Sun, Jul 24, 2011 at 3:10 AM, Gelonida N <mailto:gelon...@gmail.com>> wrote: > > Hi, > > I try to populate a template from a Model with a ForeignKey element) > members of the foreig

Re: django & py2exe

2011-07-23 Thread Gelonida N
On 07/22/2011 04:15 PM, Alexey Luchko wrote: > On 22.07.2011 02:59, Gelonida N wrote: >> Another issue, that I had is trying to use django under windows with >> py2exe. >> >> Management commands are no more found, as django would require the >> python sour

too many queries: populate template from model foreign key lookup

2011-07-23 Thread Gelonida N
Hi, I try to populate a template from a Model with a ForeignKey element) members of the foreign key element should be displayed. If I understand correctly my first attempt resulted in one query for fetching the entries from my first model and in one Query for each row in order to look up the cont

django setup environment

2011-07-21 Thread Gelonida N
http://superjared.com/entry/django-and-crontab-best-friends/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr

Re: import django models without runing the server

2011-07-21 Thread Gelonida N
On 07/18/2011 04:33 PM, bruno desthuilliers wrote: > On Jul 18, 3:33 pm, Alexander Crössmann > wrote: >> Hi Malcom, >> >> I am not sure the management commands are what I want > > Strange enough, it seems that everyone starts by saying this and ends > up writing custom management commands ;) >

Re: https / nginx / uwsgi / django problems with authentification

2011-07-21 Thread Gelonida N
Hi Robert, Thanks a lot. This is working :-) I just added uwsgi_param UWSGI_SCHEME https; as you suggested. On 07/21/2011 06:38 AM, Roberto De Ioris wrote: > >> Hi, >> >> I'm not sure whether I have to change my django configuration or my >> nginx cofiguration. >> (Thus posted to gmane.comp

https / nginx / uwsgi / django problems with authentification

2011-07-20 Thread Gelonida N
Hi, I'm not sure whether I have to change my django configuration or my nginx cofiguration. (Thus posted to gmane.comp.python.django.user and to gmane.comp.web.nginx.english) I have following setup: - nginx listening on https - most static contents like .css .js images served by nginx - everythi

Django example for searching in address book with over 1000 entries

2011-07-12 Thread Gelonida N
Hi, I'd like to implement a simple django address book Application with over 1000 entries. I'm still struggling whether (and if yes how) to use Ajax or not for searching a contact. Ideally I would start filtering the entries while typing a name in the search field) I'd like to use the applica

Re: Split up .po files for Internationalization

2011-06-24 Thread Gelonida
Hi Tom, Thanks for rectifying my answer. On 6/24/2011 5:01 PM, Tom Evans wrote: On Fri, Jun 24, 2011 at 3:45 PM, Gelonida wrote: Perhaps I'm wrong, but I thought it's enough to just create a locale//LC_MESSAGES/django.po file in your project tree and then call manage.py makemess

  1   2   >