Re: Bulk import of data

2011-12-01 Thread Nathan McCorkle
would interfacing with SQL via C or C++ be faster to parse and load data in bulk? I have files that are only a few MB worth of text, but can take hours to load due to the amount of parsing I do, and the number of database entries each item in a file makes On Mon, Nov 28, 2011 at 3:28 AM, Anler

Pointing to Memcached on Remote Server

2011-12-01 Thread mattym
Hi all - I am stuck on this one. Caching with memcached works when I reference the local box holding Django. But when I point my setting to a remote box it does not cache: This is with Django 1.3 using python-memcached on the localbox in a virtualenv 'default': { 'BACKEND':

Re: Django

2011-12-01 Thread Victor Hooi
heya, Damn, I didn't edit the subject - apologies - if there's a moderator, can you change it to "Using Django to edit XML configuration files" please? Thanks, Victor -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on

Django

2011-12-01 Thread Victor Hooi
Hi, I'm writing a Django application to mange some XML configuration files through the Django-admin. Currently, I'm converting the XML values/hierarchies into Django models. After this, we also need to code an import - to import in configuration files and populate Django models based on

Re: double trailing slash in url

2011-12-01 Thread Brian Craft
I don't think so. It's not issuing a redirect. It's just serving the view, even though the url spec doesn't match. On Thu, Dec 1, 2011 at 2:42 PM, creecode wrote: > Hello Brain, > > Could it be you are seeing the results of the APPEND_SLASH setting < >

Re: double trailing slash in url

2011-12-01 Thread creecode
Hello Brain, Could it be you are seeing the results of the APPEND_SLASH setting < https://docs.djangoproject.com/en/1.3/ref/settings/#append-slash >. Toodle-loo... creecode -- You received this message because you are subscribed to the Google Groups "Django users" group. To view

double trailing slash in url

2011-12-01 Thread Brian Craft
I have a url spec like so: (r'^foo/$', 'blah') I just noted from our server logs that if someone mistakenly types two slashes ('foo//'), the page gets served, but all of the relative links are broken. It's really confusing. I believe it should be redirecting or 404ing instead. I note that

Re: converting a large site to Django

2011-12-01 Thread Tiago Almeida
Hi, I'm assuming you have lots of html files that you want to serve. You could try writing a catch all url pattern that is handled by a generic view to serve these html files. I'm not sure if there is something already like this in django itself. However, if you don't want/need to process the html

Re: models.Q raising exception

2011-12-01 Thread Ian Clelland
On Thu, Dec 1, 2011 at 12:58 PM, Martin Tiršel wrote: > Hello, > > why this is not working? > > from django.db import models > > ... >GameProfile.objects.get( >models.Q(nick=nick) | models.Q(user=self.user), >world=self.world, >

models.Q raising exception

2011-12-01 Thread Martin Tiršel
Hello, why this is not working? from django.db import models ... GameProfile.objects.get( models.Q(nick=nick) | models.Q(user=self.user), world=self.world, ) but this is working? from django.db.models import Q ...

Re: add project directory path to python path permanently

2011-12-01 Thread DrBloodmoney
On Thu, Dec 1, 2011 at 5:59 AM, Nikhil Verma wrote: > > Hi all, > > I want to add my django project directory path to PYTHONPATH. I am a newbie > in ubuntu 11.10 > Please tell me step by step. When i do import sys sys.path.append(''project_directory path") > It

Re: select_related, need reverse foreighn key help

2011-12-01 Thread Tom Evans
On Thu, Dec 1, 2011 at 5:13 PM, Sells, Fred wrote: > I’ve got a model structure like this > > > > class Order(models.Model): > >     id = models.CharField(max_length=10, primary_key=True)  # like > OT-6212345 > >     facility = models.ForeignKey(Facility) > >    

select_related, need reverse foreighn key help

2011-12-01 Thread Sells, Fred
I've got a model structure like this class Order(models.Model): id = models.CharField(max_length=10, primary_key=True) # like OT-6212345 facility = models.ForeignKey(Facility) therapy = models.CharField(max_length=2, blank=True) . . . class Schedule(models.Model):

Re: add project directory path to python path permanently

2011-12-01 Thread Nan
Do you have pip installed? If so, you can just create a setup.py script [1] and from inside your project directory run: pip install -e ./ I assume setuptools (easy_install) can do the same, but I'm not 100% clear on the command. [1] http://docs.python.org/distutils/setupscript.html On Dec

Re: row level permissions

2011-12-01 Thread raj
Isn't this possible with a custom UserProfile and overriding the queryset() & has_change_permission() methods of each ModelAdmin? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to intercept password change in admin module ?

2011-12-01 Thread Martin J. Laubach
How about just listening to pre_save or post_save signals on the User model? 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://groups.google.com/d/msg/django-users/-/C65AzRxHDNwJ. To

Re: How to intercept password change in admin module ?

2011-12-01 Thread Marc
Thanks for your suggestion. Yes it is. Save_model is called when I modify the User but not when I change the password using the dedicated form. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

division breaks makemessages djangojs

2011-12-01 Thread Michael
Just found out about some unexpected behavior of the "django-admin.py makemessages --all -d djangojs" command. Consider this JavaScript function: function baz() { gettext("first string"); var bar = 1; var foo = bar / 2; gettext("second string"); } The first string does appear in

Re: Unable to load application to production environment

2011-12-01 Thread 彭嘉
Do you add the path of your project to system path? Try this: os.path.append('/path/to/your/project/') 2011/12/1 Ganesh Kumar > Hi guys, > > I am trying to load to my application to production environment, > It will work on test server, How to do this please guide me.

row level permissions

2011-12-01 Thread kenneth gonsalves
hi, I have an app with a model called Project. A project can have several areas, and each area many children. The fk relationship is child -> area -> project. Now for user rights: some users should only have access to the children under a specific area, others only to children and areas under a

Re: Two Servers plus one Load Balancer Vip Advice for DB?

2011-12-01 Thread Tom Evans
On Wed, Nov 30, 2011 at 11:51 PM, Colin wrote: > Hi Django users, > > So I have two servers behind a vip. I currently have it setup so if > one server goes down it uses the other http server which works great. > However I tried to set up mysql master - master and I keep getting

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

2011-12-01 Thread Ivo Brodien
>> Out of curiousity: > > Is there anything similiar which does work well in an intranet > environment or an environment, where one does not want to send data to a > third party server? Not Django but Piwik (MySQL, PHP) can do this. http://piwik.org/ -- You received this message because you

Re: add project directory path to python path permanently

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 10:59:15 UTC, Nikhil Verma wrote: > > > Hi all, > > I want to add my django project directory path to PYTHONPATH. I am a > newbie in ubuntu 11.10 > Please tell me step by step. When i do > >>>import sys > >>>sys.path.append(''project_directory path") > It does append

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

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 10:32:11 UTC, Gelonida N wrote: > > Out of curiousity: > > Is there anything similiar which does work well in an intranet > environment or an environment, where one does not want to send data to a > third party server? > I've used django-request for this - it's

add project directory path to python path permanently

2011-12-01 Thread Nikhil Verma
Hi all, I want to add my django project directory path to PYTHONPATH. I am a newbie in ubuntu 11.10 Please tell me step by step. When i do >>>import sys >>>sys.path.append(''project_directory path") It does append but not permanently. I want it like whenever i do sys.path it should show me

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

Re: How to intercept password change in admin module ?

2011-12-01 Thread Reinout van Rees
On 01-12-11 09:12, Marc wrote: Hello, I reformulate my previous question having not no answer. I would like to get control on the password change form of the admin site (let us say record some trace in another table). I put the following code in the admin.py: class MyUserAdmin(UserAdmin):

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 >

Re: Unable to load application to production environment

2011-12-01 Thread Leslie Maclachlan
Hi, I would start by making sure any third party django apps that you have installed on your test server (like django-registration) are installed on the production server as well... On Thu, Dec 1, 2011 at 11:56 AM, Daniel Roseman wrote: > On Thursday, 1 December 2011

Re: Unable to load application to production environment

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 07:16:50 UTC, Ganesh-Bugcy wrote: > > Hi guys, > > I am trying to load to my application to production environment, > It will work on test server, How to do this please guide me. > > my settings file:- > 'registration', > 'fileupload', >

How to intercept password change in admin module ?

2011-12-01 Thread Marc
Hello, I reformulate my previous question having not no answer. I would like to get control on the password change form of the admin site (let us say record some trace in another table). I put the following code in the admin.py: class MyUserAdmin(UserAdmin): def save_model(self, request,

Re: django-http-proxy multiple domains support?

2011-12-01 Thread Daryl
Bump..I'm still stuck on this one and i've had no success contacting the author.If anyones got any tips about setting this up for multiple destinations it would be greatly appreciated. On Nov 19, 4:57 pm, Daryl wrote: > Is anyone on the list using the Multiple Domain