Re: How to serve a static file with django?

2015-12-23 Thread Jani Tiainen
Hi, Also staticfiles and serving them is gone quire throughly in Django official tutorial part 6 On 23.12.2015 06:57, Dan Bikle wrote: *Hi List,* * I am new to django. I read this:

Re: New on Django and applications

2015-12-16 Thread Jani Tiainen
Hi, First reply provided you to a starting point - official Django tutorial. And considering that Django is web application framework you can build pretty much anything that you can imagine to work on web. On 16.12.2015 12:49, Baptiste Guillaud wrote: Hi ! I'm new on Django, I'm French and

Re: get all current active connected users

2015-12-10 Thread Jani Tiainen
default session TTL is 2 week after last modification). So that would still give troubles that users may have been active in last few seconds but not logged in for a few days. On 09.12.2015 15:37, Jon Ribbens wrote: On Wednesday, 9 December 2015 12:55:22 UTC, Jani Tiainen wrote

Re: get all current active connected users

2015-12-09 Thread Jani Tiainen
Hi, This is really problematic domain since as you know, Django works on HTTP request-response cycle. After cycle is finished there is absolutely no way to know "who is logged on". So first you have to determine factors that make up "currently active user". Then you have to track that

Re: Drop and replace SQL Table automatically when Model is migrated

2015-12-07 Thread Jani Tiainen
Django has built-in support for database migrations since version 1.7. In normal conditions you should be using at least version 1.8 (LTS, and lowest version supported now). On 07.12.2015 03:48, Alexander Whatley wrote: I will check with the people who made the IDE. Thanks for the input. On

Re: How can I develop GeoDjango app that can uploaded shapefiles from a user(form) not from django admin

2015-11-26 Thread Jani Tiainen
Hi, and welcome to wonderful world of GeoDjango. :) https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/#geographic-data And specially: https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/#gdal-interface On 26.11.2015 10:31, Mekonnen Legess wrote: Hello everyone I am

Re: Using request object in settings.py for custom logging

2015-11-25 Thread Jani Tiainen
is single site only. AFAIK, sites framework is useful when your django application serves multiple sites. Can you throw some more light on what can be achieved using sites ? I would like to evaluate all available options. Thanks. On Tuesday, November 24, 2015 at 4:54:36 PM UTC+5:30, Jani Tiainen

Re: Using request object in settings.py for custom logging

2015-11-24 Thread Jani Tiainen
Hi, Problem is that you quite certainly have different users and several processess/threads which would lead logging configuration per request. Is there a reason you don't use something like sites framework to differentiate clients? On 24.11.2015 12:22, Nikunj Badjatya wrote: Hello,

Re: Requesting data from an API and rendering data on website

2015-11-18 Thread Jani Tiainen
/msgid/django-users/7dc809a0-4f20-4cd6-99b8-d50e3e186285%40googlegroups.com <https://groups.google.com/d/msgid/django-users/7dc809a0-4f20-4cd6-99b8-d50e3e186285%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- You

Re: Making a field readonly according to the user in admin.py

2015-11-18 Thread Jani Tiainen
if (user is 'roby'): readonly_fields=['quantity',] list_display = ('title', 'author', 'quantity') fields=(('title', 'author'), ('quantity')) order_by= ['title', ] Thanks Vittorio -- Jani Tiainen -- You received this message because you are subscribed to the Google G

Re: Timer for online examination

2015-11-17 Thread Jani Tiainen
#1 in web development says - "Never trust user input". On 17.11.2015 09:47, Robin Lery wrote: Hello, I think you will have to implement jquery/javascript to make the timer. After the countdown finishes js can post the form automatically. Cheers. On Tue, Nov 17, 2015 at 1:11 PM, Ja

Re: Timer for online examination

2015-11-16 Thread Jani Tiainen
Hi, If you're looking something magical there isn't anything. Just declare expiracy timestamp and compare against it in code. It should be rather trivial to do with JS down counter to UI for mode concrete feedback to end user. But keep final word of expiracy in Django code. On 17.11.2015

Re: Connecting to FirebirdSQL-Database as a second DB

2015-11-11 Thread Jani Tiainen
. At the moment I'm trying to get this <https://github.com/cfingerh/django-firebird/tree/master>to work On Wednesday, November 11, 2015 at 10:53:31 AM UTC+1, Jani Tiainen wrote: Hi, Are you sure that django-firebird is compatible with version of Django you're using? Doc

Re: Connecting to FirebirdSQL-Database as a second DB

2015-11-11 Thread Jani Tiainen
Hi, Are you sure that django-firebird is compatible with version of Django you're using? Docs seem to indicate that django-firebird supports only Django 1.6.x On 11.11.2015 11:39, Djangaroo wrote: Hello everybody, I'm having trouble connecting a second Database to my Django Project. I

Re: update_or_create() always creates (or recreates)

2015-11-06 Thread Jani Tiainen
Your problem lies on the way Django actually carries out create or update. As name suggest, create or update does either one. But that's what you don't want - you want conditional update. Only update if certain fields have been changed. Well this can be done few ways. So you want to do

Re: can I write Django a client consuming RESTfull api from elsewhere

2015-11-05 Thread Jani Tiainen
users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/563AB16E.9060604%40gmail.com > . > > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen - Well planned is half done, and a half done has been sufficient before

Re: How do I relate two tables using field name instead of id?

2015-11-05 Thread Jani Tiainen
tps://groups.google.com/d/msgid/django-users/f42b087f-dffe-42df-994b-22e9028dd4c7%40googlegroups.com?utm_medium=email_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen - Well planned is half done, and a half done has been suffici

Re: Controlling access at table row level

2015-11-05 Thread Jani Tiainen
Django has foundation for object level (row level) perms: https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#handling-object-permissions So basically you just check: current_user.has_perm('permname', obj) For a full list of methods you can check:

Re: how to create a project in django in windows 7

2015-09-15 Thread Jani Tiainen
Hi, I wrote a long time ago my setup I used when working in Windows. Since that I moved on to *nix since everything was just easier to get by. Here's the link: https://djangonautlostinspace.wordpress.com/2012/04/16/django-and-windows/ On 15.09.2015 10:34, Nick Sarbicki wrote: I am a

Re: real time notification system

2015-09-14 Thread Jani Tiainen
There are several ways to do that but something like Twisted and Websockets or NodeJS and Websockets could do the trick. There also exists swampdragon project that is supposed to have all the goodies in easy to use format. On 14.09.2015 14:20, shamila ali wrote: How can implement real time

Re: migration error "geo_db_type" when using postgres as second database for geodjango

2015-09-14 Thread Jani Tiainen
return None def allow_syncdb(self, db, model): """ Make sure the auth app only appears in the 'auth_db' database. """ if db == 'geodjango': return model._meta.app_label == 'world' elif model

Re: migration error "geo_db_type" when using postgres as second database for geodjango

2015-09-14 Thread Jani Tiainen
On 14.09.2015 11:58, Wenyao Xue wrote: Hi, I use mysql as default database and postgres for geodjango related appliction. my settings: DATABASE_ROUTERS = ['world.routers.GisRouter', 'rest_shop.routers.ShopRouter', 'rest_client.routers.ClientRouter']

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-10 Thread Jani Tiainen
I've been developing with Dojotoolkit and ExtJS. Both integrate with Django as well as any other JS framework. On 10.09.2015 09:47, Mario Gudelj wrote: +1 angular. Stack overflow is your friend and there's a lot of angular on it. You can do a lot with it with basic knowledge as well. And

Re: django.db.utils.DatabaseError: ORA-12704: character set mismatch

2015-09-08 Thread Jani Tiainen
QMayPJYzT69PMoJAN1S9K4reQ%40mail.gmail.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group a

Oracle DB, some help needed

2015-09-08 Thread Jani Tiainen
Thank you for your co-operation. -- Jani Tiainen - Well planned is half done, and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Re: Need help in Django Task

2015-08-18 Thread Jani Tiainen
il to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/c31c4026-3efc-477e-b026-48e9e6364117%40googlegroups.com. > For more options, visit https://gr

Re: Problems installing a Django package

2015-08-13 Thread Jani Tiainen
> >> the same error: "*invalid command 'bdist_wheel'"*. Anyone could tell me > >> what is going on? Is my first time doing a reusable app. > >> > >> > > -- > You received this message because you are subscribed to the Google Groups > &qu

Re: Django vs ExtJS

2015-06-08 Thread Jani Tiainen
our customers have been really happy with the choise. It's cheaper for our customers, and cheaper for us to develop. One problem, as you noted as well, is to hire Python and Django pros. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django

Re: Django vs ExtJS

2015-06-08 Thread Jani Tiainen
ogle.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/53e17853-9922-4f77-bf9a-4cea7d35ade3%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Jani Tiainen -- You received this message because you

Re: Sending Data from client side(another computer) to Django(my computer) using Socket library

2015-05-11 Thread Jani Tiainen
groups.google.com/d/msgid/django-users/CACwh%3D0zjAYKjmyTJTWcucTyLM_iVaLokcgqREZpXgzp7e_GEGw%40mail.gmail.com?utm_medium=email_source=footer> > >> . > >> For more options, visit https://groups.google.com/d/optout. > >> > > > > -- > > You received this messag

Re: Serialize QuerySet Q (not the result)

2015-04-22 Thread Jani Tiainen
glegroups.com . > >> To post to this group, send email to django...@googlegroups.com > >> . > >> Visit this group at http://groups.google.com/group/django-users. > >> To view this discussion on the web visit > >> https://groups.google.com/d/msgid/django

Re: view queryset object in admin view

2015-04-13 Thread Jani Tiainen
> >> https://groups.google.com/d/msgid/django-users/61ec8171-77c5-4bba-9274-8f209422d15e%40googlegroups.com > >> > >> <https://groups.google.com/d/msgid/django-users/61ec8171-77c5-4bba-9274-8f209422d15e%40googlegroups.com?utm_medium=email_source=footer> > >>

Re: Seems like a geodjango bug with multiple databases

2015-02-20 Thread Jani Tiainen
bug? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post t

Re: drop-in replacement for admin module foreign key relation UI

2015-02-16 Thread Jani Tiainen
ions for this, but I was > just wondering if anyone would have up-to-date recommendations in this > mailing list. I'm on Python 3.4.2 and Django 1.7.4. I would start with built-in implementation, a.k.a. rawid_id_fields <https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.c

Re: Tests and temp tables

2015-02-05 Thread Jani Tiainen
and makes transactions as a no-op), you should use TransactionalTestCase. https://docs.djangoproject.com/en/1.7/topics/testing/tools/#transactiontestcase -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
ascii? is there a field type? You could try explicit cast to VARCHAR2, not sure does that help at all: x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID=CAST(%s AS VARCHAR2)",[u'TO1']) -- Jani Tiainen -- You received this message because you are subscribed to the Googl

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
ery for now and just document that it's insecure and will be replaced something better as soon as such a mechanism is available. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: django select extremely slow on large table

2015-01-23 Thread Jani Tiainen
r that when oracle drops to implicit data type conversions things tend to get sideways. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send

Re: django select extremely slow on large table

2015-01-22 Thread Jani Tiainen
Hi, 1.5b rows is rather big data. Could you test what .values() or .values_list() produces in terms of speed. also print qs might actually pull in all selected records in Python memory so it may take a while to constuct bunch of objects. On Thu, 22 Jan 2015 07:32:36 -0800 (PST) Joris

Re: Django with ExtJs, any app ?

2015-01-22 Thread Jani Tiainen
Hi, Easier on what sense? I've had great success with django-rest-framework and ExtJS as is for a long time, without need to have an app to do anything for me. On Thu, 22 Jan 2015 13:17:09 -0200 Fellipe Henrique wrote: > Hello, > > There's any app to make easier

Re: Processing uploaded csv on the basis of user input

2015-01-15 Thread Jani Tiainen
ers+unsubscr...@googlegroups.com. To post to this group, > send email to django-users@googlegroups.com. Visit this group at > http://groups.google.com/group/django-users. To view this discussion > on the web visit > https://groups.google.com/d/msgid/django-users/c5acdad9-eb00-438a-bf37-fa

Re: Desired: Field behavior like AutoField + unique_with

2015-01-13 Thread Jani Tiainen
gt; > On Tuesday, January 13, 2015 at 5:07:21 AM UTC-8, Jani Tiainen wrote: > > > > I've done something similiar. > > > > Only way to do that is that you need to upkeep that tenant > > sequence_id manually, > > > > So doing something like: > &g

Re: Desired: Field behavior like AutoField + unique_with

2015-01-13 Thread Jani Tiainen
I've done something similiar. Only way to do that is that you need to upkeep that tenant sequence_id manually, So doing something like: class Tenant(models.Model): name = models.CharField(max_length=50) sequence_value = models.IntegerField() and in a code: tenant =

Re: Expected performance of the django development server?

2015-01-04 Thread Jani Tiainen
to optimize queries is to use select_related and prefetch_related queryset methods to cut down number of queries needed. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Django vs ExtJS

2014-12-30 Thread Jani Tiainen
(10g and 11g), ExtJS (4.3), Dojotoolkit (1.6), OpenLayers (2.x) and mapserver (6.x) -- Jani Tiainen -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an e

Re: django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

2014-12-23 Thread Jani Tiainen
aignTemp model. So if you change active status of modules they're not reflected to that list. You need to provide more context of your model so we can help with proper solution. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-01 Thread Jani Tiainen
comes from isn't compatible with your version of Django? -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@g

Re: Error: 'NoneType' object has no attribute 'strip'

2014-12-01 Thread Jani Tiainen
gt; So, can someone tell me what is the issue here? How are you trying to set data and trying to save to database (used commands would be helpful) -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread Jani Tiainen
combined with "is_default_image" must be unique. Which means that for each product you can have _two_ images, one where is_default_image is true and one where is_default_image is false. And this is forced on database level as well. But apparently that is what you intended to do. There

Re: Run some code after Model Save completes (and after database is updated)

2014-10-15 Thread Jani Tiainen
"read committed" should improve situation there. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr..

Re: Django: How to apply filter on geometry type using GeoDjango QuerySet

2014-10-14 Thread Jani Tiainen
ype function. > You can't, at least not with current Django versions. Geodjango assumes that geometry column contains just one type of a geometries. But you should be able to use .raw() query to get what you want to. -- Jani Tiainen -- You received this message because you are subscribed

Re: query join tables

2014-10-13 Thread Jani Tiainen
bouth? You can leverage reverse relation managers rather easily: If you do have a person available already you can do the following: choices_for_person_on_date = person.choice_set.filter(date=dater) -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Dj

Re: Is there anything similar to phpmyadmin

2014-09-23 Thread Jani Tiainen
I personally like DBeaver, since it can handle several types of DBMSes out of the box. And it's free. There are prebuilt packages for pretty much any major os/distribution. On Mon, 22 Sep 2014 19:37:26 -0700 (PDT) Yuan-Liang Tang wrote: > Thanks, but I'd like to use

Re: Install Django Apps via Admin Interface

2014-09-12 Thread Jani Tiainen
that to happen just through admin? Would you trust your users really to do all that - basically giving full control what users installs to your system without discretion? -- Jani Tiainen On Fri, 12 Sep 2014 11:26:56 +0200 Thomas Güttler <h...@tbz-pariv.de> wrote: > > > Am 10.0

Re: ASP .NET web service and Django

2014-05-26 Thread Jani Tiainen
You might be interested in suds library, it's basically lightweight SOAP stuff, it may work or it may not. All depends quality of WSDL you do have. And to my knowledge getting Django to run on IronPython requires some hacks... On Mon, 26 May 2014 04:09:19 -0700 (PDT) shar100101

Re: django and oracle

2014-05-16 Thread Jani Tiainen
Oh sorry about that. It seems that connection attribute is only populated when you have connection opened for something. So you have to do initial dummy stuff: connection.cursor() # Opens connection curs = connection.connection.cursor() # Get raw cursor Or, alternatively as a one liner: curs =

Re: django and oracle

2014-05-14 Thread Jani Tiainen
On Thu, 15 May 2014 07:02:08 +0300 Jani Tiainen <rede...@gmail.com> wrote: > On Wed, 14 May 2014 07:54:58 -0700 (PDT) > "J. D." <john.arnold.dav...@gmail.com> wrote: > > > Can someone help me with cx_Oracle and Django?! :) > > > >

Re: django and oracle

2014-05-14 Thread Jani Tiainen
racle 5.1.2 > You're seeing that error because cursor returned from Django connection is not actually cx_Oracle cursor but a wrapper that has similar methods. That is done to overcome different binding variable types and to use %s (oracle uses :name format) You should be able to get pure c

Re: Complex query

2013-09-08 Thread Jani Tiainen
Problem is that you have to be able to express it in SQL. And thus ther is not much you can do in SQL to get what you actually wanted. Considering amount of the data fetched - it's relatively low query count and unless you're hitting very busy site you wont notice much of difference doing this

Load base test data outside Django framework

2013-09-02 Thread Jani Tiainen
ble to all supported django backends, though Oracle and PostgreSQL (+ PostGIS) is my main target. Sqlite (+ SpatiaLite) would be a bonus. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: serve static files

2013-08-26 Thread Jani Tiainen
ups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Django signals to all connections?

2013-08-20 Thread Jani Tiainen
Hi, Well it seems that you have understood things a bit incorrectly. First at all, only logged in user is the one accessing some page (a view) from Django system. After that there is nobody logged in traditional sense - there is no simple way to detect that user closed browser and was "logged

Re: Representing infinity or "no limit" in an integer field?

2013-08-20 Thread Jani Tiainen
case... > +1 to store as Null. > > On Monday, August 19, 2013 1:07:27 AM UTC-7, Jani Tiainen wrote: > > > > On Mon, 19 Aug 2013 00:39:09 -0700 (PDT) > > Victor Hooi <victo...@gmail.com > wrote: > > > > > Hi, > > > > > > I hav

Re: Representing infinity or "no limit" in an integer field?

2013-08-19 Thread Jani Tiainen
defined" which would suit well in that sense. Problem is that usually databases aren't very fast to search NULL values so if you have to for example produce often list of products that you can buy "infinite amount", you would like to consider using value(s) that don't conflict from val

Re: ImportError: No module named 'exceptions' - Python3

2013-08-12 Thread Jani Tiainen
Hi, In Python 3 exceptions module was removed and all standard exceptions were moved to builtin module. Thus meaning that there is no more need to do explicit import of any standard exceptions. On Mon, 12 Aug 2013 10:51:32 +0530 abhijeet shete wrote: > Hi Folks,

Testing with legacy data

2013-08-05 Thread Jani Tiainen
like to recreate database from the scratch everytime or not to import data every time. Any suggestions how I could proceed? -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: User Permissions

2013-07-30 Thread Jani Tiainen
p. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > For more options,

Re: Django not enforcing blank=False on a model

2013-07-29 Thread Jani Tiainen
k=True, form validation will allow entry of an empty value. If a field has blank=False, the field will be required." Also, you should note that .save() doesn't imply running validation <https://docs.djangoproject.com/en/1.5/ref/models/instances/#validating-objects> -- Jani Tiain

Re: How i can get real value of ForeingKey?

2013-06-26 Thread Jani Tiainen
ou see visible one field in your model (field1) your model actually contains already two fields: id and field1. In your case field1 can contain any 10 character string. How you want to represent your related object is totally a different story and there is not single correct answer - it all d

Re: how to change the root url of a project?

2013-06-26 Thread Jani Tiainen
o. In real case you'll have some server to keep django up and running and there you have option to use suburls as you want to. But it requires setting up real frontend server like nginx, apache or similiar. -- Jani Tiainen "Impossible just takes a little longer" -- You recei

Re: Django tutorial part 1 (Using the api, p.choice_set.all() displays choices in reverse order)

2013-06-18 Thread Jani Tiainen
re is not actually any good field to sort by in Choice-model. [1] https://docs.djangoproject.com/en/1.5/ref/models/querysets/#order-by -- Jani Tiainen "Impossible just takes a little longer" -- You received this message because you are subscribed to the Google Groups "Django

Re: database -> model -> charting

2013-06-07 Thread Jani Tiainen
You can quite easily use pretty much any JS charting libraries. Google Charts for example. And pretty much any JS framework you pick do seem to have some kind of a charting library available. Simplest way in most cases is to render data for char as a JSON (which in turn can be uses as-is in fo

Re: Django foreing keys joins

2013-06-06 Thread Jani Tiainen
: >>> print Counter.on_medicos.filter(loc_id__isnull=True).only('id').query That should return what you might have been expecting. -- Jani Tiainen "Impossible just takes a little longer" On Thu, 6 Jun 2013 01:05:32 +0200 Àlex Pérez <alex.pe...@bebabum.com> wrote:

Re: Dump LineString GEOM to Point GEOM (One Model To Another)

2013-05-31 Thread Jani Tiainen
ing > GEOM. > > How can I do this within GeoDjango w/o using rawSQL and bypassing the > models? Linestrings do have coord_seq property that you can iterate over and generate point geometries form that and save to another table. -- Jani Tiainen -- You received this message because

Re: Testing with complex database setups

2013-05-27 Thread Jani Tiainen
Bummer... I whish I could have gotten away with Django test framework but it seems that custom testrunner would be the way. Have to check my options really. On Fri, 24 May 2013 03:23:44 -0700 (PDT) akaariai <akaar...@gmail.com> wrote: > On 23 touko, 15:09, Jani Tiainen <rede...@gmai

Testing with complex database setups

2013-05-23 Thread Jani Tiainen
heavily that there really exists all that trigger-function mess in the database? So that I don't need everytime to start from the scratch but from some known state of the db? -- Jani Tiainen -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Raise field error in models clean method

2013-05-20 Thread Jani Tiainen
On Sun, 19 May 2013 06:38:50 -0700 (PDT) Kai Schlamp wrote: > Hello. > > How to raise a `ValidationException` in the models `clean` method? > > def clean(self): > from django.core.exceptions import ValidationError > raise ValidationError({'title':

Re: Django & Oracle connection problem

2013-05-16 Thread Jani Tiainen
If you want just to connect Oracle but not run server locally using instant client is much more easier option to setup. On Wed, 15 May 2013 02:43:36 -0700 (PDT) Michael Van wrote: > I have the same error when python managment runserver : > cx_Oracle.DatabaseError:

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-10 Thread Jani Tiainen
what is wrong. It's related types of bind variables and any of them might be incorrect for some reason. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Packaging django, python and a project for one click setup on a windows machine

2013-04-05 Thread Jani Tiainen
om/2008/06/26/django-desktop-app/> [1] http://cx-freeze.sourceforge.net/ [2] http://www.py2exe.org/ -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Restful User Authentication for Ember/Backbone client with Tastypie

2013-03-12 Thread Jani Tiainen
nd DELETE to /sessions// to logout Personally, if working with Django and HTTP I would go for cookie based auth since it would be natural. Otherwise API key isn't that bad option. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message b

Re: Best ways and common practices to lock the Database before a new deploy

2013-02-21 Thread Jani Tiainen
uot;maintenance in progress" or some other meanful information. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: session is not expiring

2013-02-21 Thread Jani Tiainen
ttp://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "

Python trademark at risk in Europe: We need your help!

2013-02-15 Thread Jani Tiainen
help. There is a company in the UK that is trying to trademark the use of the term "Python" for all software, services, servers... pretty much anything having to do with a computer." -- Jani Tiainen - Well planned is half done and a half done has been sufficient before

Re: how to password will come in hidden form in django?

2013-02-14 Thread Jani Tiainen
m it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jani Tiainen - We

Re: Object composition in django

2013-02-13 Thread Jani Tiainen
isit https://groups.google.com/groups/opt_out. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: One ->Many forms outside admin

2013-02-11 Thread Jani Tiainen
isit https://groups.google.com/groups/opt_out. Inline formsets to be exact is something that you're looking for: https://docs.djangoproject.com/en/1.4/topics/forms/modelforms/#inline-formsets -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- Yo

Re: One ->Many forms outside admin

2013-02-11 Thread Jani Tiainen
is group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "

Re: Problems doing ajax post with ImageField

2013-02-10 Thread Jani Tiainen
it https://groups.google.com/groups/opt_out. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

Re: Object level permissions implementation

2013-02-06 Thread Jani Tiainen
up at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Djang

Re: plz help me for error in python for django.....

2013-02-06 Thread Jani Tiainen
b\backends\sqlite3\base.py", line 344, in execute return Database.Cursor.execute(self, query, params) DatabaseError: no such column: polls_poll.pub_date >>> On Wed, Feb 6, 2013 at 2:49 PM, Jani Tiainen <rede...@gmail.com <mailto:rede...@gmail.com>> wrot

Re: plz help me for error in python for django.....

2013-02-06 Thread Jani Tiainen
Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-user

Re: Object level permissions implementation

2013-02-05 Thread Jani Tiainen
Actually I had slightly incorrect term: I need _field_ (column) level permissions, not object (row) level permissions. 6.2.2013 8:36, Jani Tiainen kirjoitti: No it's not, it's more like enhancement to standard Django permissions that works with predefined "named" permissions.

Re: Object level permissions implementation

2013-02-05 Thread Jani Tiainen
r have permission or not to access this object. 5.2.2013 21:00, Nikolas Stevenson-Molnar kirjoitti: If I understand correctly, that's exactly what it's for: https://code.osuosl.org/projects/object-permissions/wiki/Using#Checking-Perms _Nik On 2/4/2013 10:17 PM, Jani Tiainen wrote: Afaik object-pe

Re: Object level permissions implementation

2013-02-04 Thread Jani Tiainen
-party package? http://pypi.python.org/pypi/django-object-permissions _Nik On 2/4/2013 4:59 AM, Jani Tiainen wrote: Hi all, I've in need of implementing (rather complex) object level permissions. I've difficulties to determine how to proceed. Let's assume that I've following models: class

Object level permissions implementation

2013-02-04 Thread Jani Tiainen
'm looking for: 1) I could implement all rules to authentication backend. 2) Delegate actual permission checking to models. 3) Something else and better. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Jani Tiainen
ion. For the SQL posted above, the numbers are approximately: 12,000 rows in the `news` table, maybe 10 `news_category` rows, about 100 `writers` and around 3000 `images`. All properly indexed and with sensible column types. On Tuesday, January 22, 2013 10:53:40 AM UTC, Jani Tiainen wrote: Hi,

Re: Struggling with slow startup / SQL in new app (using raw SQL)

2013-01-22 Thread Jani Tiainen
nning on my local server rather than production but performance is broadly similar). Can anyone help me? I realise I've perhaps gone off-piste by writing raw SQL but I feel it was justified. thanks, Matt -- Jani Tiainen - Well planned is half done and a half done has been s

Global filtering of the querystes

2013-01-21 Thread Jani Tiainen
o doit? I only could come up with threadlocals and special manager that can be fed with global filtering rules. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... -- You received this message because you are subscribed to the Google Groups "Djang

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-10 Thread Jani Tiainen
10.1.2013 8:59, Ian Kelly kirjoitti: On Wed, Jan 9, 2013 at 11:40 PM, Jani Tiainen <rede...@gmail.com> wrote: If we just force using force_unicode everything works except in older versions of cx_Oracle (our server had 5.0.4 or something) connection strings can't be unicode for some

<    1   2   3   4   5   6   7   8   >