Re: Massive import from CSV to Database

2011-11-12 Thread Fabio Natali
On 11/12/2011 07:40 PM, Andre Terra wrote: Hello, Fabio I took a look at django-csv-importer but since my files weren't quite clean (or comma separated), I ended up rolling my own solution using celery[1], to make the uploading rask asynchronous, and DSE[2], to allow for faster bulk imports, as

Re: [] Re: memcached - Errors and Solution - please provide comments!

2011-11-12 Thread Russell Keith-Magee
On Sun, Nov 13, 2011 at 11:35 AM, Cal Leeming [Simplicity Media Ltd] wrote: > +1 on hashing the key. > Just my two cents worth but, the way our company does it as standard is > something like this: > import hashlib > def generate_key(*args, **kwargs): >     return hashlib.sha224(pickle.dumps([args

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

2011-11-12 Thread Eric Chamberlain
We serve the static files from Amazon S3. -- Eric Chamberlain, Founder RingFree Mobility Inc. On Nov 8, 2011, at 1:46 AM, Gelonida N wrote: > Hi, > > > I'm having an rather weak (CPU) server accesible over a rather slow network. > > Therfore my plan is to use > multiple readable debuggable c

Re: [] Re: memcached - Errors and Solution - please provide comments!

2011-11-12 Thread Cal Leeming [Simplicity Media Ltd]
+1 on hashing the key. Just my two cents worth but, the way our company does it as standard is something like this: import hashlib def generate_key(*args, **kwargs): return hashlib.sha224(pickle.dumps([args, kwargs])).hexdigest() Then you can do stuff like: lol = YourModel.objects.all()[0] g

Re: ForeignKey relationship to FlatPage not available in filter()

2011-11-12 Thread Sceva
I think the problem was I did not have from django.db import models at the top. -- 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/-/cBRkBTlxUuQJ. To post t

How many read operations is the get() method causing?

2011-11-12 Thread Emil Sandin
Hi, I am running a Django app on appengine, but I am constantly hitting the roof with read operations. I have not found an easy way to find what's causing this, so I am trying to find it out myself. To me, it seems that even if I use all().filter(..) or get(), the database is queried for all instan

Re: key error in templates - solved

2011-11-12 Thread Evan Reiser
I had the same thing happen to me and this was the only post I found on the internet that mentions it. Note to other people who have this problem: *Be careful passing instances of model objects into celery tasks since they get pickled and your FileField fields will probably be removed via pick

Re: Network configuration with django webpage

2011-11-12 Thread Ivo Brodien
You will have to make some system calls from your django views (in python of course) Cheers On Nov 12, 2011, at 6:22, Ganesh Kumar wrote: > Hi guys, > > I am new to django, I want to create a simple page to configure > network configuration, > to configure ip address and set submask and gate

Re: Query exclude via model_set property?

2011-11-12 Thread Joshua Russo
it looks like this is the best way to tackle the problem. http://stackoverflow.com/questions/1724317/django-exclude-on-a-many-to-many-relationship-through-a-third-table -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on

ForeignKey relationship to FlatPage not available in filter()

2011-11-12 Thread Sceva
I have a project using the FlatPage app. I have added a search app with a keyword model. It has a foreignkey relationship to the FlatPage model: from django.contrib import admin > > from django.db import models > > from django.contrib.flatpages.models import FlatPage > > >> >> class SearchKeywor

Query exclude via model_set property?

2011-11-12 Thread Joshua Russo
I have a 3 table solution class Organization(models.Model): name = models.CharField("Organization's name", max_length=100) class OrganizationDepartment(models.Model): organization = models.ForeignKey(Organization) name = models.CharField("Name", max_length=100) contacts

Re: Massive import from CSV to Database

2011-11-12 Thread Dan Poirier
There are some ways to make large data imports much faster. See e.g. http://www.caktusgroup.com/blog/2011/09/20/bulk-inserts-django/ Dan -- 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@goog

Re: Massive import from CSV to Database

2011-11-12 Thread Andre Terra
Hello, Fabio I took a look at django-csv-importer but since my files weren't quite clean (or comma separated), I ended up rolling my own solution using celery[1], to make the uploading rask asynchronous, and DSE[2], to allow for faster bulk imports, as well as a lot of trial and error. Take a lo

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Steve McConville
> Is it possible to drop a Python script (around 50 lines) into one of your > django pages? Would this be embedding into the template code? You could wrap it in a custom template tag: https://docs.djangoproject.com/en/1.3/howto/custom-template-tags/ -- steve -- You received this message becau

Re: Why does Django create Postgres timestamp columns with time zones?

2011-11-12 Thread Kevin
>From >postgresql.org/docs/8.4/static/datatype-datetime.html: > "All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the timezone configuration parameter befo

Re: Why does Django create Postgres timestamp columns with time zones?

2011-11-12 Thread K.C. Smith
It's not required by PostgreSQL. See, http://www.postgresql.org/docs/8.4/interactive/datatype-datetime.html , for example. You may be able to change the data type of that column directly in the database. (See http://www.postgresql.org/docs/8.4/interactive/ddl-alter.html#AEN2595 .) Maybe "ALTER

Massive import from CSV to Database

2011-11-12 Thread Fabio Natali
Hi everybody! I am developing a Django website. I want the admin to be able to perform massive import of products into the database. This is the workflow: - the admin uploads a CSV file with a long list of products e.g.: product_1;230$;16kg;img_001.jpg;"A very good item of ours" product_2;130

Re: Django Gig

2011-11-12 Thread Mo Mughrabi
Yes, definitely we accept offshore developers working from their countries. On Sat, Nov 12, 2011 at 5:32 PM, Casey Greene wrote: > He means, "are you interested in job applicants that are not on-site (i.e. > people working remotely)?" > > Hope this helps, > Casey > > > On 11/12/2011 08:52 AM, mo.

MVP--an open source repository for libraries and modules

2011-11-12 Thread skier31415
I'm a coder, but I don't code for the majority of my time. What I do is identify, install, employ, and adapt mostly working solutions. I stand on the shoulders of giants. There are very few good ways to identify these solutions. The top on my list is "how flashy is the site", and "how extensive

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, I don't know your specific situation, but this is probably not worth a fee. You already know Django and Python, all you need to do is extend that knowledge with some AJAX. If you run into problems, there's always this group ;) -- Joey "JoeLinux" Espinosa Software Developer http://about.me

Re: Django Gig

2011-11-12 Thread Casey Greene
He means, "are you interested in job applicants that are not on-site (i.e. people working remotely)?" Hope this helps, Casey On 11/12/2011 08:52 AM, mo.mughrabi wrote: We are located in Kuwait as for the second question am not quite sure what you mean. On Nov 12, 6:07 am, Russell Keith-Magee

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Oh, this does help...tremendously. Thanks for taking the time out and explaining. I think that's enough for me to start learning via the docs/experimenting and hopefully get something implemented. If I can't implement this, do you know anyone that could do this for a fee? thanks, jimmy -- You

Weird, but likely really stupid ManyToMany save issue

2011-11-12 Thread mpm
This is going to sound pretty ridiculous but I am having an issue saving a ManyToMany relationship through a post. I stripped my app down to the most basic example from the tutorial. Applicable Model Code: (I have forms and an Author, but those populate just fine. So I already have a few authors

Re: Django Gig

2011-11-12 Thread mo.mughrabi
We are located in Kuwait as for the second question am not quite sure what you mean. On Nov 12, 6:07 am, Russell Keith-Magee wrote: > On Fri, Nov 11, 2011 at 9:49 PM, Mo Mughrabi wrote: > > Hello fellows django developers, > ... > > Please email me back if you are interested and I could share mo

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, Not sure what JavaScript library you use (or if you're familiar with JavaScript at all), but this is a very rudimentary example: First, create a View in Django that you can call, and capture the results: import os > from django.http import HttpResponse > ... > def ajax(req): > if req.

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Oh, that would *totally* be fine. I have no idea how to do that, do you know of any docs that might show me how to execute this code on the server-side and print out via AJAX? thanks! jimmy -- You received this message because you are subscribed to the Google Groups "Django users" group. To v

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, Does it NEED to be embedded into the page? I ask because something like this would be a lot easier if you executed server-side, and simply returned the output to the front-end using AJAX. Would that serve your purpose here, or am I misunderstanding the original question? -- Joey "JoeLinux

Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Hi, Is it possible to drop a Python script (around 50 lines) into one of your django pages? Would this be embedding into the template code? I am experimenting with doing this but I haven't had any luck in finding out how. An example of what I am trying to do is to place a script like this http