Re: How to parse an XML file with django.

2008-10-16 Thread JFQueralt
Hi, James. Does that imply I can use Pythong´s XML manipulation libraries in Django blocks? There has to be a way to retrieve information fron a file in Django (I ´ve seen official docs on it). XML is nothing than a structured data file so there should be a way to retrieve a value and use it in

Re: How to parse an XML file with django.

2008-10-16 Thread James Bennett
On Thu, Oct 16, 2008 at 2:19 AM, JFQueralt <[EMAIL PROTECTED]> wrote: > There has to be a way to retrieve information fron a file in Django (I > ´ve seen official docs on it). > XML is nothing than a structured data file so there should be a way to > retrieve a value and use it in a template. Onc

Re: How to parse an XML file with django.

2008-10-16 Thread Malcolm Tredinnick
On Thu, 2008-10-16 at 00:19 -0700, JFQueralt wrote: > Hi, James. > > Does that imply I can use Pythong´s XML manipulation libraries in > Django blocks? > > There has to be a way to retrieve information fron a file in Django (I > ´ve seen official docs on it). > XML is nothing than a structured

Re: Custom template tag problem: "No module named models"

2008-10-16 Thread felix
oh well. check that you have an __init__.py file in the templatetags directory try this: in bookmark_tags.py (and do keep the name that way, or later you will be caught by this) right before the import line throw it in into the debugger: import pdb; pdb.set_trace() in the debugger try: >>> i

Re: Deploy application in bytecode

2008-10-16 Thread [EMAIL PROTECTED]
On Oct 16, 6:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I agree with you, but I am an officer and my boss likes of things > well, then, I am trying to bring a legal solution for him with Django, > I came to dot.net where the code is compiled. Haven't you ever heard of Lutz's Reflecto

Re: Deploy application in bytecode

2008-10-16 Thread James Bennett
On Thu, Oct 16, 2008 at 12:02 AM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Why has no one yet mentioned that .pyc files don't really protect your > code? I tend to treat Python bytecode as the "no-right-click script" of the Python world; those sorts of silly JavaScript tricks which "protect"

Re: Generating a file from lots of data

2008-10-16 Thread David Reynolds
On 15 Oct 2008, at 3:27 pm, bruno desthuilliers wrote: > I could be (and I strongly suspect it would be), but I really can't > tell for sure. Now this should be easy to find out, isn't it ?-) The csv module gave a slight speed increase (enough for me to notice without any profiling or accurat

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-16 Thread raeldc
Hello Again Guys! With your guidance, I was able to get a pretty good idea on how to put mini-content boxes on my website. However, one thing I realized (with my still limited understanding of Django), is that templatetags are actually coupled with apps. To create templatetags, I must make it as

Re: How to parse an XML file with django.

2008-10-16 Thread Russell Keith-Magee
On Thu, Oct 16, 2008 at 3:56 PM, kang <[EMAIL PROTECTED]> wrote: > If you want to parse xml, I recommend feedparser. > > http://www.feedparser.org/ > > wish it helps You may wish to be a little bit careful giving out advice like that. Feedparser is a parser for... wait for it... feeds. All feeds

Re: Django events

2008-10-16 Thread tsmets
minor typo ... Site is htp://www.djangoproject.com without s \T, On Oct 16, 11:31 am, "Daniele Procida" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 16, 2008, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > >> Is there a good single source of information about Django-related events > >> (training,

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-16 Thread bruno desthuilliers
On 16 oct, 12:34, raeldc <[EMAIL PROTECTED]> wrote: > Hello Again Guys! > > With your guidance, I was able to get a pretty good idea on how to put > mini-content boxes on my website. > > However, one thing I realized (with my still limited understanding of > Django), is that templatetags are actua

Re: Django events

2008-10-16 Thread Russell Keith-Magee
On Thu, Oct 16, 2008 at 5:31 PM, Daniele Procida <[EMAIL PROTECTED]> wrote: > > How easy would it be to set up something on, or connected to, Django People? Django People is very useful, but it isn't an 'official' Django resource. It's just something that a member of the Django community has cont

Re: Generating a file from lots of data

2008-10-16 Thread bruno desthuilliers
On 16 oct, 12:11, David Reynolds <[EMAIL PROTECTED]> wrote: > On 15 Oct 2008, at 3:27 pm, bruno desthuilliers wrote: > > > I could be (and I strongly suspect it would be), but I really can't > > tell for sure. Now this should be easy to find out, isn't it ?-) > > The csv module gave a slight speed

Re: Template inheritance and flatpages

2008-10-16 Thread bruno desthuilliers
On 16 oct, 12:32, chiggsy <[EMAIL PROTECTED]> wrote: > If I am using flatpages, can i have my flatpages/default.html inherit > from my sites base.html? > > I've a template dir, with a subdirectory "flatpages" and file > "default.html" inside that subdir. > > Now, in default.html the first line is

Re: choices instantiation

2008-10-16 Thread Karen Tracey
On Thu, Oct 16, 2008 at 1:43 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > hi, > > When I instance a ModelForm with a record of its base model, there is > a CharField with "choices" that doesn't show the stored value in the > combobox. Is this expected behaviour? > No. Details of your mo

Query to display ManyToOne Bi-Directional associations?

2008-10-16 Thread JohnnyLeitrim
Hi, I am quite new to django, so the following question may have an obvious answer, but I could not find it. I have defined the model from the django tutorial, Poll and Choice: class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeFi

Re: Using Tutorial

2008-10-16 Thread maumir
Thanks but I have not yet resolved. in the file "settings.py" I added mysite.polls in INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', ' django.contrib.sessions', 'django.contrib.sites', ' mysite. polls' ) with or without a comma after 'polls' is the same. When launching

Re: internationalization and template magic caching

2008-10-16 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-16, o godz. 14:23, przez matei: > There seems to be a problem with how django caches the templates, when > using trans tags and gettext in general. When i update the language > files, the changes wont take effect (well sometimes), nor with a > server restart. The

Re: Using Tutorial

2008-10-16 Thread Karen Tracey
On Thu, Oct 16, 2008 at 8:46 AM, maumir <[EMAIL PROTECTED]> wrote: > > Thanks but I have not yet resolved. in the file "settings.py" I added > mysite.polls in > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > ' django.contrib.sessions', > 'django.contrib.sites', > '

Re: get_object_or_404 error

2008-10-16 Thread jseleuco
Yup, you are right. The thing was I started with the google app egine first, then saw I could use the django framework. I think I'll start again just with the Django framework, but anyway I have not seen any solution to that problem... On Oct 16, 6:30 am, Malcolm Tredinnick <[EMAIL PROTECTED]

Re: Generating a file from lots of data

2008-10-16 Thread David Reynolds
On 16 Oct 2008, at 12:44 pm, bruno desthuilliers wrote: > Given your models definitions, a Contact has one *or more* > AddressBooks. Is this the right modeling for your app ? If so, which > AddressBook instance do you use for your csv ? They can have more than one. It's a shop (based on satchmo

Re: Generating a file from lots of data

2008-10-16 Thread bruno desthuilliers
On 16 oct, 15:08, David Reynolds <[EMAIL PROTECTED]> wrote: > On 16 Oct 2008, at 12:44 pm, bruno desthuilliers wrote: > > > Given your models definitions, a Contact has one *or more* > > AddressBooks. Is this the right modeling for your app ? If so, which > > AddressBook instance do you use for yo

twid?

2008-10-16 Thread Justin Lilly
You might have better luck with integration from the guys at thisweekindjango.com (podcast). They have a host of community features already in place on their website so it seems like a better fit over there. --~--~-~--~~~---~--~~ You received this message because yo

Re: Update_object and file uploads

2008-10-16 Thread [EMAIL PROTECTED]
On Oct 14, 8:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks Malcolm. I've read the docs on the new file storage and feel > fairly comfortable with it, generally speaking--at least all my other > code is ported over to use it with no problems. But I'm not seeing how > it works with

Re: internationalization and template magic caching

2008-10-16 Thread matei
You are right. I now know what happened to me and caused confusion. It appears to me django is taking the po files from the django admin so words like password and change were translated without me specifying my own .po .mo files. Not a preferable behaviour for some people maybe. Is it a setting?

Re: Using Tutorial

2008-10-16 Thread bruno desthuilliers
On 16 oct, 14:46, maumir <[EMAIL PROTECTED]> wrote: > Thanks but I have not yet resolved. in the file "settings.py" I added > mysite.polls in > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > ' django.contrib.sessions', > 'django.contrib.sites', > ' mysite. polls'

dynamic values in limit_choices_to

2008-10-16 Thread yves_s
Hi I have this 2 models [CODE] class FontFamily(models.Model): name = models.CharField(max_length="50") default_fontfile = models.ForeignKey('FontFile', limit_choices_to = { 'id__in' : (1,2) }, # something like 'self.fontfile_set.all()' would be

Re: Deploy application in bytecode

2008-10-16 Thread bruno desthuilliers
On 16 oct, 07:02, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Oct 16, 3:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I agree with you, but I am an officer and my boss likes of things > > well, then, I am trying to bring a legal solution for him with Django, > > I came to dot.ne

Re: Template inheritance and flatpages

2008-10-16 Thread chiggsy
> > Yeps. But use {% extends "base.html" %} instead - notice the quotes. Aie! How could I miss that? :( Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

How to use class_prepared signal

2008-10-16 Thread Thomas Guettler
Hi, I try to use the class_prepared signal to register permissions on a model class. Example: MyModel has a View-Permission. To avoid typos I don't want to use the string representation of permissions ('myapp_view_mymodel'). I want to use a class attribute (MyModel.PERM_VIEW) in my code. It se

internationalization and template magic caching

2008-10-16 Thread matei
hello There seems to be a problem with how django caches the templates, when using trans tags and gettext in general. When i update the language files, the changes wont take effect (well sometimes), nor with a server restart. There must be a place where django has this stored, as when I delete my

ldapauth and TLS

2008-10-16 Thread Daniele Procida
I'm trying to get django.contrib.auth.ldapauth.LDAPBackend - from: working with our LDAP server. IWe need TLS before the server will permit us to exchange a password with it. According to the documentation, we should be able to

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-16 Thread Israel Dacanay Canasa
Bruno, Thanks a lot! I didn't know that Django will include the templatetags of all apps mentioned in settings.py. I thought that templatetags are included only within the context of the current app accessed by the browser. Now everything looks clearer, and I feel that I just got out from

everything works except apache seeing django app

2008-10-16 Thread delfick755
hello. I'm trying out django atm, and I've got it working using the manage.py runserver, but I'm having difficulty making my apache server use it properly, getting the ImportError: Could not import settings problem I have it so that the django app is in my home directory, and I've added an appro

Template inheritance and flatpages

2008-10-16 Thread chiggsy
If I am using flatpages, can i have my flatpages/default.html inherit from my sites base.html? I've a template dir, with a subdirectory "flatpages" and file "default.html" inside that subdir. Now, in default.html the first line is {%extends base.html%} which is in the directory above the error:

Parsing through feed to get to enclosure data?

2008-10-16 Thread Frank Peterson
I have a RSS feed and I need to be able to get to the enclosure data out of it. Our code loads libRSS, here is what I have so far and its not working {% for itm in rss.items %} {{itm.description}} FLV {% endfor %} Here is what my feed l

Re: everything works except apache seeing django app

2008-10-16 Thread felix
possibly it may be on YOUR pythonpath but it won't be on apache's pythonpath. here is my /etc/apache2/extra/httpd-vhosts.conf # SUSTAIN BETA PythonPath "['/home/crucial/gitpo/djapps','/home/crucial/gitpo/pluggables','/home/crucial/gitpo','/home/crucial/gitpo/sustain'] + sys.path" Order

Re: How to parse an XML file with django.

2008-10-16 Thread kang
If you want to parse xml, I recommend feedparser. http://www.feedparser.org/ wish it helps On Thu, Oct 16, 2008 at 3:19 PM, JFQueralt <[EMAIL PROTECTED]> wrote: > > Hi, James. > > Does that imply I can use Pythong´s XML manipulation libraries in > Django blocks? > > There has to be a way to ret

Re: ldapauth and TLS

2008-10-16 Thread Jeff Anderson
Daniele Procida wrote: > I'm trying to get django.contrib.auth.ldapauth.LDAPBackend - from: > > > > working with our LDAP server. > > IWe need TLS before the server will permit us to exchange a password with it. > > According to the

Re: everything works except apache seeing django app

2008-10-16 Thread Stephen Moore
On Thu, Oct 16, 2008 at 10:42 PM, felix <[EMAIL PROTECTED]> wrote: > > > possibly it may be on YOUR pythonpath but it won't be on apache's > pythonpath. > k then.. well I added PythonPath "['/home/iambob/web', '/home/iambob/web/testSite'] + sys.path" to my httpd.conf so the relevant section beco

How to translate into Django

2008-10-16 Thread Pythoni
In PHP can be used http://url_address";; ?> How must I translate that to be able to use it in Django? Thanks for help. Cheers, Jo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: ManyToManyField with extra content and Django admin

2008-10-16 Thread Brandon Taylor
Hi Marco, I'm going to handle this a little differently than using inlines. That method doesn't give me quite the workflow that I'm looking for, but an extra class with some meta data for the table name will work just fine. Thanks, Brandon On Oct 16, 1:32 am, Marco Buttu <[EMAIL PROTECTED]> wro

Re: How to translate into Django

2008-10-16 Thread Brett Parker
On 16 Oct 08:09, Pythoni wrote: > > In PHP can be used > include "http://url_address";; > ?> > > > How must I translate that to be able to use it in Django? First off, is that a fixed string URL... Second, is that a site under your control that you're including if one isn't true, probably a

Re: How to translate into Django

2008-10-16 Thread Jeff Anderson
Pythoni wrote: > In PHP can be used > include "http://url_address";; > ?> > > > How must I translate that to be able to use it in Django? > Use a Python library to fetch the content, and set a context variable passed to a template to hold the included content. Jeff Anderson signature.asc De

MSSQL+django-pyodbc gives ProgrammingError

2008-10-16 Thread Michael J. Korman
I'm using Django 1.0 with django-pyodbc SVN and MS SQL Server. I have a model with a field of type TextField. When I try searching (on a different field) for items of this model in the admin, I get the following error: ProgrammingError at /admin/llreg/propertycontact/ ('42000', '[42000] [FreeT

Re: How to parse an XML file with django.

2008-10-16 Thread kang
I know it. Its name tells eveything~ I just want to give him a remmendation if he want to deal with feed. On Thu, Oct 16, 2008 at 7:03 PM, Russell Keith-Magee <[EMAIL PROTECTED] > wrote: > > On Thu, Oct 16, 2008 at 3:56 PM, kang <[EMAIL PROTECTED]> wrote: > > If you want to parse xml, I recommen

Re: Django events

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> Is there a good single source of information about Django-related events >> (training, workshops, conferences, wahtever)? >> >> I think a calendar of such things at would >> be handy... > >Such th

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-16 Thread Lisa Dusseault
+1 - thanks to Ronny, Bruno and Daniel's advice in this thread. It helps sometimes to have pointers to info/tools in the context of a problem, even if I was vaguely aware of the info/tools before. On Thu, Oct 16, 2008 at 4:30 AM, Israel Dacanay Canasa <[EMAIL PROTECTED]>wrote: > > Bruno, > > Tha

Re: everything works except apache seeing django app

2008-10-16 Thread bruno desthuilliers
On 16 oct, 16:58, "Stephen Moore" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 16, 2008 at 10:42 PM, felix <[EMAIL PROTECTED]> wrote: > > > possibly it may be on YOUR pythonpath but it won't be on apache's > > pythonpath. > > k then.. > > well I added PythonPath "['/home/iambob/web', > '/home/iambob/w

Re: everything works except apache seeing django app

2008-10-16 Thread Stephen Moore
On Thu, Oct 16, 2008 at 11:56 PM, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > > On 16 oct, 16:58, "Stephen Moore" <[EMAIL PROTECTED]> wrote: >> On Thu, Oct 16, 2008 at 10:42 PM, felix <[EMAIL PROTECTED]> wrote: >> >> > possibly it may be on YOUR pythonpath but it won't be on apache's >> > pyt

Legacy databases

2008-10-16 Thread huw_at1
Hi, I want to use Django to query two legacy Oracle databases. >From what I have read Django can handle legacy databases provided the primary key is an auto-incremented integer field in the tables of the databases. Does Django work in such a way that it will take these databases and rebuild the

Re: Deploy application in bytecode

2008-10-16 Thread [EMAIL PROTECTED]
H. The byte-code of Java and byte-code of dot.net are also not safe? The best way to protected my code is a license? On 16 out, 11:54, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 16 oct, 07:02, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > > On Oct 16, 3:41 pm, "[EMAIL PROTECTED]"

How to get a page in Django?

2008-10-16 Thread Gnarlodious
Hello. I've spent about 8 hours trying to figure out how to get an actual page in my browser. Are there any clear instructions on how to get a minimal default? Sorry, I guess I expected a default configuration that could be modified. All I can see is a page that tells me "It worked! Congratulation

Re: Legacy databases

2008-10-16 Thread Dj Gilcrease
Your first obstacle (currently) is going to be getting django to work with multiple databases (the two Oracle and whatever its base DB is). This is achievable, but undocumented and involves knowing the internals of the QuerySet. Once you have that setup and functional (I would create separate tabl

Re: Deploy application in bytecode

2008-10-16 Thread Ovnicraft
2008/10/16 [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > H. > The byte-code of Java and byte-code of dot.net are also not safe? > > The best way to protected my code is a license? What you mean with protect? > > > On 16 out, 11:54, bruno desthuilliers <[EMAIL PROTECTED]> > wrote: > > On 16 oct

Re: Deploy application in bytecode

2008-10-16 Thread bruno desthuilliers
On 16 oct, 18:31, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > H. > The byte-code of Java and byte-code of dot.net are also not safe? Not even binary machine code is safe. Where do you think all these cracked softwares come from ? Back in the mid-heighties, when Steinberg came to France

Re: Error Pages and Flatpages

2008-10-16 Thread Håkan Waara
Try searching for 404 on http://docs.djangoproject.com -- there's both flatpages-specific information on how to deal with 404 errors and also how to handle it in general in your django apps. In general, try searching the django docs site first -- there's a lot of good info there. /Håkan

recursive relationship in model

2008-10-16 Thread coderb
hi all, I'm having trouble with a category table when trying to add rows in admin my model is a Category table with a self reference using 'parent' which enables unlimited depth of categories. Its defined as follows: class Category(models.Model): name= models.CharField(max_length=10

Re: everything works except apache seeing django app

2008-10-16 Thread bruno desthuilliers
On 16 oct, 18:06, "Stephen Moore" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 16, 2008 at 11:56 PM, bruno desthuilliers (snip) > > You need to know the user under which Apache is running (wait... > > Ubuntu ? This should be www-data then) and give read access to this > > user. Something like > > >

Re: recursive relationship in model

2008-10-16 Thread Dj Gilcrease
Here is my Category model (With generic relations) that has unlimited depth and it works http://dpaste.com/hold/84881/ It has generic relations since so many things need to be categorized and I didnt think writing a category model for each thing followed the DRY principle, but if you dont need t

Re: recursive relationship in model

2008-10-16 Thread bruno desthuilliers
On 16 oct, 18:52, coderb <[EMAIL PROTECTED]> wrote: > hi all, > > I'm having trouble with a category table when trying to add rows in > admin > > my model is a Category table with a self reference using 'parent' > which enables unlimited depth of categories. Its defined as follows: > > class Cat

Re: How to get a page in Django?

2008-10-16 Thread bruno desthuilliers
On 16 oct, 18:13, Gnarlodious <[EMAIL PROTECTED]> wrote: > Hello. I've spent about 8 hours trying to figure out how to get an > actual page in my browser. Are there any clear instructions on how to > get a minimal default? yes, indeed: http://docs.djangoproject.com/en/dev/ HTH --~--~-~--

Re: everything works except apache seeing django app

2008-10-16 Thread felix
is your app like this testSite __init__.py models.py settings.py etc. ? ie. its not one folder deeper testSite actualSite __init__.py models.py settings.py and did you restart apache ? flix > --~--~-~--~~~---~--~~

using flat pages and sites

2008-10-16 Thread Bobby Roberts
hi. I am needing advice as a django noob. I am hosting at webfaction and want to use django to power about 11 sites. I have my django app installed with a current project in its own directory with its own settings etc. My question is what is the best way to proceed from this point? Do I just

Re: How to get a page in Django?

2008-10-16 Thread Jonathan Lin
Hi There, I'm also a new user of Django, so I understand that the learning curve might be steep, but you should know that Django requires you to actually build things. Ie. There is no built in cms. It is a framework that allows you to construct a content management system, or a web app. I sug

Re: recursive relationship in model

2008-10-16 Thread coderb
Thanks DJ and Bruno for the super quick responses On Oct 16, 6:00 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 16 oct, 18:52, coderb <[EMAIL PROTECTED]> wrote: > > > > > hi all, > > > I'm having trouble with a category table when trying to add rows in > > admin > > > my model is a Cate

Limit choices by object, not model

2008-10-16 Thread AmanKow
I need to limit choices dynamically by an object, not a class: class CertType(models.Model): name = models.CharField(max_length=128) class ActivityTopic(models.Model): cert_types = models.ManyToMany(CertType) class Participation(models.Model): activity_topic = models.ForeignKey(acti

icontains case-sensitive on MySQL

2008-10-16 Thread AndyB
I've googled and the only problems seem to be with people trying to do case-sensite lookups. What could be going wrong here?: >>> b.filter(name__icontains='Saff') [] >>> b.filter(name__icontains='saff') [] MySql 5.0.51 Django 1.0 Tables are InnoDB UTF8 collation UTF8 bin Tried it on a my dev ma

Re: icontains case-sensitive on MySQL

2008-10-16 Thread Ronny Haryanto
On Fri, Oct 17, 2008 at 12:55 AM, AndyB <[EMAIL PROTECTED]> wrote: > I've googled and the only problems seem to be with people trying to do > case-sensite lookups. > > What could be going wrong here?: > b.filter(name__icontains='Saff') > [] b.filter(name__icontains='saff') > [] Could yo

Re: Deploy application in bytecode

2008-10-16 Thread [EMAIL PROTECTED]
H. Thank you bruno, thank ovnicraft, thank all. I understand this question, we all help me. On 16 out, 14:45, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 16 oct, 18:31, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > H. > > The byte-code of Java and byte-code of dot.net are

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Jeff Anderson <[EMAIL PROTECTED]> wrote: >> According to the documentation, we should be able to set LDAP_OPTIONS >> along with the other settings: >> >> ``LDAP_OPTIONS`` -- hash, python-ldap global options and their values >> {ldap.OPT_X_TLS_CACERTDIR:

Re: icontains case-sensitive on MySQL

2008-10-16 Thread AndyB
Well - someone on #Django told me to check encoding settings and I did but I failed to read the following: http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html Using binary collation changes the default sensitivity of string comparisons. Is this not something that Django should be abstra

database fail over

2008-10-16 Thread Vance Dubberly
Ok just got a huge project that is going to require alot of big iron. Prolly 4 webservers and at least 2 if not 4 database server and a memecache server. Load balancing across webservers isn't a big deal. But 1 very big weakness I'm seeing in django as it stands is the ability to deal with multip

Re: Limit choices by object, not model

2008-10-16 Thread Ronny Haryanto
On Fri, Oct 17, 2008 at 12:23 AM, AmanKow <[EMAIL PROTECTED]> wrote: > I need to limit choices dynamically by an object, not a class: > When adding or changing a > participation object, either in the admin or via model forms, I need > to limit the choices for cert type to those offered by the

Re: ldapauth and TLS

2008-10-16 Thread Dj Gilcrease
LDAP_OPTIONS = 'ldap.OPT_X_TLS_DEMAND: True' should be LDAP_OPTIONS = {ldap.OPT_X_TLS_DEMAND: True} I would think Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Oct 16, 2008 at 12:04 PM, Daniele Procida <[EMAIL PROTECTED]> wrote: > > On Thu, Oct 16, 2008, Jeff Anderson <[EM

Python have a JIT (Just-in-time) compiler?

2008-10-16 Thread [EMAIL PROTECTED]
Python have a JIT (Just-in-time) compiler? --~--~-~--~~~---~--~~ 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

Django development environment (newbie)

2008-10-16 Thread Trastabuga
Hi I am used to Emacs/Slime/Lisp running under detachtty so I can connect to the remote lisp image using Emacs/Slime and do my development in this environment. I'd like to give Python/Django a try, so I'd like to know is it possible to emulate a similar environment? Basically the question is: "Ca

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > > LDAP_OPTIONS = 'ldap.OPT_X_TLS_DEMAND: True' >should be > LDAP_OPTIONS = {ldap.OPT_X_TLS_DEMAND: True} Sdly, that immediately crashes the server: Traceback (most recent call last): File "manage.py", line 4, in import setti

Re: rename or renaming a Django application

2008-10-16 Thread varikin
On Oct 15, 7:17 pm, coderb <[EMAIL PROTECTED]> wrote: > hi tim, thanks for the quick response. > > I will convert your bash commands to my (whisper) "windows" > equivalents to manually rename all instances. I have tools like > windows grep etc.. > Doing batch renames, search replaces etc .. should

Re: Django development environment (newbie)

2008-10-16 Thread bruno desthuilliers
On 16 oct, 20:26, Trastabuga <[EMAIL PROTECTED]> wrote: > Hi (snip background) > Basically the question is: "Can I connect to remote Python process > which handles http requests and add/modify functions there without > reloading the server?" Short answer : no. Anyway, on-the-fly editing of produ

Re: Python have a JIT (Just-in-time) compiler?

2008-10-16 Thread bruno desthuilliers
On 16 oct, 20:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Python have a JIT (Just-in-time) compiler? There's psyco, but it only works on x86 and imposes some restrictions in the way you code. --~--~-~--~~~---~--~~ You received this message because you ar

Re: Django development environment (newbie)

2008-10-16 Thread Ronaldo Zacarias Afonso
You can use django-admin.py runserver. Maybe it uses a different approach, but in a nutshell, it's a web server that you can use to develop your django applications and it does what you want (You don't have to reboot the server every time you do a change in your apps). []s Ronaldo. On Thu, Oct

Re: DB record retrieval from every N minutes

2008-10-16 Thread grahamu
Good idea Thomas. I'll experiment with using __range to get 24 individual records instead of retrieving all records and then looping over the queryset. Thanks. Graham On Oct 15, 1:15 am, Thomas Guettler <[EMAIL PROTECTED]> wrote: > grahamu schrieb:> I'd like to find an efficient method to retriev

Re: Python have a JIT (Just-in-time) compiler?

2008-10-16 Thread [EMAIL PROTECTED]
But because it does not track the python when it is installed natively, since this is a great benefit On 16 out, 17:02, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 16 oct, 20:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Python have a JIT (Just-in-time) compiler? > > There's ps

Re: How to avoid out of sync sequence for primary key using Postgresql?

2008-10-16 Thread cfobel
Oh, and I want to emphasize that I am open to any constructive suggestions - if this is a known issue with Postgresql that doesn't have a reasonable solution, I'd be open to switching to MySQL, etc. if necessary. (Obviously my preference would be to stick with Postgresql because that's what our t

Re: Django development environment (newbie)

2008-10-16 Thread Trastabuga
Can I combine it with Apache so I can serve my static and index.html with Apache and the rest with django-admin.py server? Thank you, Andrew On Oct 16, 3:10 pm, "Ronaldo Zacarias Afonso" <[EMAIL PROTECTED]> wrote: > You can use django-admin.py runserver. Maybe it uses a different > approach, but

How to avoid out of sync sequence for primary key using Postgresql?

2008-10-16 Thread cfobel
Hi, My setup is: Django 1.0 (rev 9066) Postgresql v8.3 I recently encountered a situation where the sequence for the primary key of one of my models became out of sync, which caused the following error when trying to save a new model instance: IntegrityError ... 'duplicate key violates unique

Re: ldapauth and TLS

2008-10-16 Thread Dj Gilcrease
Ahh yes, been a while since I messed with my settings for that file but I think this is what you need LDAP_OPTIONS = {'OPT_X_TLS_DEMAND': True} Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Oct 16, 2008 at 12:43 PM, Daniele Procida <[EMAIL PROTECTED]> wrote: > > On Thu, Oct

Search functionality over the DB

2008-10-16 Thread Katja L.
Hi, I need to implement a search over a text field I have ... The user can enter multiple values into a search box and I need to do kind of full text search in one field of the database. E.G. class DataSet(models.Model): ... abstract = models.TextField() ... Let's say the user enters "jan

Figuring out prefork v. worker

2008-10-16 Thread Doug Van Horn
I run several applications on a Slicehost VPS and I recently switched them to run the worker MPM and mod_wsgi. After switching, I ran into an issue with the worker MPM leaking timezone information across django applications (actually the timezone leaks under both mod_python and mod_wsgi/embedded

Re: Search functionality over the DB

2008-10-16 Thread R. Gorman
The is a view I have to search some of my models: def search(request): query = request.GET.get("s", "") q = Q() for term in query.split(): q |= Q(abstract__icontains=term) | Q(next_field__icontains=term) results = [i for i in itertools.chain(DataSet

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Dj Gilcrease <[EMAIL PROTECTED]> wrote: >LDAP_OPTIONS = {'OPT_X_TLS_DEMAND': True} I'm afraid that's not it either; nor is: LDAP_OPTIONS = {'ldap.OPT_X_TLS_DEMAND': True} Daniele --~--~-~--~~~---~--~~ You received this message because you

Re: Execute function after Add in admin site

2008-10-16 Thread Joe Sr
On Oct 13, 1:53 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 13 oct, 18:11, Joe Sr <[EMAIL PROTECTED]> wrote: > > > I am working on an "Issues" application and I want to execute code to > > send an e-mail to an assignee after an issue has been added.  I saw > > that there are signals I

Re: Django development environment (newbie)

2008-10-16 Thread Hernan Olivera
> Can I combine it with Apache so I can serve my static and index.html > with Apache and the rest with django-admin.py server? There is a very single configuration option in apache that auto-reloads code too, in django documentation. -- Hernan Olivera --~--~-~--~~~--

Re: Django development environment (newbie)

2008-10-16 Thread Jeff Anderson
Trastabuga wrote: > Can I combine it with Apache so I can serve my static and index.html > with Apache and the rest with django-admin.py server? > You could make your MEDIA_URL point to a URL that is hosted somewhere else, like Apache. I find it easiest to just use the static file view when run

Re: database fail over

2008-10-16 Thread Vance Dubberly
Just saw this: http://softwaremaniacs.org/soft/mysql_replicated/en/description/ anybody try it? Looks pre- queryset refactor, don't know if that matters. Vance On Thu, Oct 16, 2008 at 11:17 AM, Vance Dubberly <[EMAIL PROTECTED]> wrote: > Ok just got a huge project that is going to require alo

Re: ldapauth and TLS

2008-10-16 Thread Steven Armstrong
Daniele Procida wrote on 10/16/08 20:43: > On Thu, Oct 16, 2008, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > >> LDAP_OPTIONS = 'ldap.OPT_X_TLS_DEMAND: True' >> should be >> LDAP_OPTIONS = {ldap.OPT_X_TLS_DEMAND: True} > > Sdly, that immediately crashes the server: > > Traceback (most recent call

Re: How to display image from ImageField in ModelAdmin?

2008-10-16 Thread volksman
Beauty in motion! Works like a charm...Thanks! --~--~-~--~~~---~--~~ 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,

Re: django on apache looses all styling

2008-10-16 Thread William Purcell
I see that django documentation says to copy the admin media files so that they live within your Apache document root. I have put the media files from the django/contrib in the Apache document root. How does django/apache see them? On Thu, Oct 16, 2008 at 2:42 PM, William Purcell <[EMAIL PROTECTED

django on apache looses all styling

2008-10-16 Thread William Purcell
I am new to django, and web development in general for that matter, so please bear with me. I have done the introductory tutorial at the django web site. Everything works fine. I have now installed apache and I'm trying to serve django with mod_python installed in apache. I can now browse to localh

  1   2   >