om
Subject: Re: Best Practice for Raw SQL
On Wed, Apr 13, 2011 at 1:38 PM, Sells, Fred
wrote:
In my case I had to read some legacy data from a different schema on the
same MySQL server and it was easy (but perhaps not elegant) to just
establish a separate connection using MySQLdb modul
I received this helpful hint from Shawn M. when faced with the same issue:
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' #whereever your
settings.py is located.
>From the docs:
http://docs.djangoproject.com/en/dev/topics/settings/
-Original Message-
From: django
Since Excel will import a csv file, why not just write a csv file. In mysql,
while ugly, you could shell down and use the mysql command line options to
export a query to csv.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Od-Erdene Ch
Sent: Thursday,
I'm using AJAX, jquery and JSON for the first time, having used
templates to render XML for Flex/Flash in all my previous Django work.
My code looks like this
records = models.Residents.objects.extra( where=[], params=[...])
data = serializers.serialize('json', records, ensure_ascii=False,
fie
FWIW I use flex for the rich client and get xml out of django which
flex handles nicely.
I use Ldap for Authorization (had to use legacy junk for authentication
to be compliant) and I have a cron job that loads the ldap groups I need
and there members into my db. Solves speed and reliability pro
I had to learn basic Php for a class. It's worth it to subscribe to
Lynda.com for a few months to get their online training videos. Removes
much pain. Like all training, it covers the basics and you really don't
know what you don't know until you try to do something.
-Original Message-
You can run a django module directly if you do something like:
if __name__ == '__main__':
sys.path.append( '/all/projects/one-up-from-site directory) #may not
be needed in all cases.
os.environ['DJANGO_SETTINGS_MODULE'] = 'mds30.settings'
The problem I just encountered using
I think many of the members of this group have a pro-python bias for a
good reason. Most of us have had to work with many other frameworks and
languages and Python is the only one I would use to "unwind".
Sometimes it's worth "paying your dues"
--
You received this message because you are subsc
Are there any example sites running this?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.co
Thanks.
From: django-users@googlegroups.com
[mailto:django-us...@googlegroups.com] On Behalf Of Jonas Obrist
Sent: Sunday, December 26, 2010 5:29 AM
To: django-users@googlegroups.com
Subject: Re: RE: The Django-CMS 2.1 Release Candidate 1 has been
released!
Hi fred
There's a lot of site
I've seen similar errors if I left in print >>sys.stderr statements,
although that was using mod_python.
From: django-users@googlegroups.com
[mailto:django-us...@googlegroups.com] On Behalf Of Graham Dumpleton
Sent: Thursday, January 06, 2011 2:23 AM
To: django-users@googlegroups.com
Subject:
Depending on what you need to do
You could shell down and run FOP from Apache foundation which is xml,
xslt to pdf
Or if you are filling in a form, you can use Adobe LiveCycle to define a
form and use code like below to fill in the form
def getPDFContent(id):
values = getAllValues(id)
I'm sure the solution is out there somewhere, but my google search is
giving me too many false positives.
I have a stand along python program that will be run as a cron job and I
don't know how to launch it so it picks up the django settings, etc.
I can run it like this
>python manage.py shell
>
Thanks to all who responded and especially Shawn who said much the same
thing in a way I could grasp.
...
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
>From the docs:
http://docs.djangoproject.com/en/dev/topics/settings/
Shawn
--
You received this message because you
I'm using python 2.4 and django 1.2.4 with MySQL 5.0 FWIW
I have the following models (code deleted to simplify)
class Message(models.Model):
facility= models.CharField(max_length=2, null=True, blank=True)
msgtype = models.CharField(max_length=3)
class Pv(models.Model):
mess
I would appreciate some guidelines on a better way to deploy a
flex/flash frontend with a django backend.
I've got flex and django working nicely using the Flex HTTPService and
XML and the message content. Probably not as efficient as other methods
but this is an intratnet and performance is not
I'm using a redhat enterprise 6 and all these are standard or available
as standard installs.
-Original Message-
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] On Behalf Of Eric Chamberlain
Sent: Tuesday, March 22, 2011 12:31 PM
To: django-users@googlegroups.com
It's painless. I'm no sysadmin but I just followed the instructions and
everything worked. I'm even using python 2.4 due to some outside
issues.
-Original Message-
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] On Behalf Of Vladimir
Sent: Tuesday, March 22, 20
I'm using my own auth and ldap via python-ldap as a query only; others maintain
it. My only issue is that of response. I query all the groups I care about
and get all their members and keep that in a MySQL db that I refresh every 5
minutes of an unrelated cron job.
From: django-users@googl
I also have made the conversion from Java/Swing/Webapp(jnlp) to Django,
but I used Flex (a.k.a. Flash) for my UI because I've got a rich client
background and did not want to deal with Browser inconsistencies. I'm
happy with that choice. I use a very simple django template to render a
very consi
It was explained very clearly to me, I believe by shawn, but I've lost the
original reference. If the file you want to run is in your django app
directory you just need
import datetime, sys, os, logging
os.environ['DJANGO_SETTINGS_MODULE'] =
'YourDirectoryThatContainsTheSettingsModule.settings
I'm just converting from mod_python to mod_wsgi and making progress. I
would like to be able to deploy multiple independent webapps without
having to edit the apache configs each time. I'm thinking of something
like
/var/www/wsgi-scripts
App1.wsgi
App2.wsgi
I've been googling and trying this for 2 days now, I'm sure I'm just
confused about something basic because it cannot be that hard. I've
tried all the hints I found via google and they made sense but no
success.
I'm running RHEL 6 Python 2.6.5, django 1.2.4 and mod_wsgi 3.2. I'm
trying to config
Using eclipse you can create a run configuration that starts the
dbserver and it will auto-reload whenever you change a file. Of course
since the dbserver auto restarts when it detects a file change, the
command line is not all that bad.
-Original Message-
From: django-users@googlegroups.
This may be using a canon to swat a fly, but...
I had a project some time ago where I needed a very repetitive
java/swing UI. I ended up creating python classes that had a __repr__
method that generated the java source code. Then I was able to have
very concise python files that instantiated the
I've seen a lot of chatter about Eclipse mylyn which can be integrated
with trak. Not used it however.
-Original Message-
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] On Behalf Of Javier Guerra
Giraldez
Sent: Monday, April 04, 2011 10:21 AM
To: django-users@g
There are guys in this group who are much more sophisticated meta
programmers than I. But here's a very simple method:
It is easiest if each unique module has the same class name, such as
"class Controller:"
Then define and import all your plugins (does not allow uploading
plugin, but that's ris
Because our active directory contains many more users than are allowed
to use my django app, I have a cron job that runs every 5 minutes and
updates a mysql database with the subset I care about. That way if AD
is offline at the time, I'm not hosed.
From: django-users@googlegroups.com
[mailto:
Try mysql from the command line, make sure the service is running.
Sometimes the install does not set it up to start on a reboot.
Make sure you did not specify the port (socket) either when you
installed or in django -- usually it's 3306 on a pc, don't know about
mac.
-Original Message-
F
Although I have not tried it, the docs are pretty clear about how to sync a
django model to an existing legacy DB (sqlserver08 in this case).
But is there a way to sync to a select statement with multi-table joins without
first creating a View?
I know that creating a view would be easiest, but
Downloaded the gz file, unzipped and ran python setup.py install
Note, due to network security settings, I cannot use pip or any similar tool
that needs external web access
I get the following errors, any advice on how to fix?
…snip….
creating /usr/lib/python2.6/site-packages/Django-1.7-py
I've got a queryset that is ~ a 6 table join of a lot of data that generates
about 1000 records with about 25 fields each
I've got ~100 terminals hitting this query every 1 minute looking for a subset
of 25 records
~20 records change every minute
I was thinking about updating the data (queryse
Thanks Erick, I was not aware of Varnish.
Erik wrote:
1000 records from 6 tables shouldn't be a problem if your database is properly
indexed. Databases are good at caching query results and not doing excess work
when the data hasn't changed. Maybe the first request from a terminal will be
slow
bject: Re: need django.cache advice
On Thu, Jan 9, 2014 at 4:43 PM, Sells, Fred
wrote:
>
> Fred: I was unclear. The initial join is 1 x 1000 x 20 x 100 ... which
> gets reduced to about 1000 records. A few records are changed every second.
are the 'interesting' 1000 out-re
I have to integrate to a large read only legacy mssql database .
The many-to-many tables have a lot of additional fields like start/end dates of
the relationship and their own naming conventions
Can anyone point me to some links that treat this topic in depth. I've looked
at the django book an
database with complex many to many relationships
On Mon, Feb 24, 2014 at 2:54 PM, Sells, Fred
wrote:
> I have to integrate to a large read only legacy mssql database .
while certainly it's possible to configure this as a second database and use
the ORM, I've found that it's more
The latest “Two Scoops of Django” book claims to have good info on deploying;
I’ve not read it yet.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Walter Wang
Sent: Tuesday, March 04, 2014 11:54 AM
To: django-users@googlegroups.com
Subject: Re: [ELI5] how
101 - 137 of 137 matches
Mail list logo