Re: Django Suitable for this?

2008-06-08 Thread James Bennett
On Sun, Jun 8, 2008 at 1:05 AM, beetlecube <[EMAIL PROTECTED]> wrote: > I read a blog entry somewhere by someone contemplating the ideal type > of web application needs that Django best meets: Since it was > written originally for publishing articles in a newspaper environment, > it's good for b

Re: building distributed systems with django?

2008-06-08 Thread John Dohn
On Sun, Jun 8, 2008 at 7:57 AM, lgr888999 <[EMAIL PROTECTED]> wrote: > > replication isnt exactly distributing... with only one master db which > handles all the writes you have a single point of failure... In MySQL and very likely in other DBs you can have a multi-master setup with more than on

reversing url tag with viewname as variable in the context

2008-06-08 Thread ferran
Hi all, The tag {% url viewname args %} supports a context variable for viewname?? i don't know how put a context variable in viewname, any suggestion?? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: building distributed systems with django?

2008-06-08 Thread Pat
I'm not certain I understand what you're asking because high available isn't exactly related to distributed systems. I think you're asking about sharding (partitioning of data across multiple databases). If that's your question, then the answer is yes, it can be done. It's just writing a custom

Re: reversing url tag with viewname as variable in the context

2008-06-08 Thread Alex Koshelev
No. Built-in {% url %} tag doesn't support variable as view name. To solve this you can write your own url-like template tag with needed functionality. Or refactor you code to avoid using the view name as variable:) On Jun 8, 12:39 pm, ferran <[EMAIL PROTECTED]> wrote: > Hi all, > > The tag {% ur

Re: reversing url tag with viewname as variable in the context

2008-06-08 Thread ferran
Thanks Alex for confirm my suspicions IMHO this is a great feature for url tag, if anyone have a idea for implement this functionality, (like a eval(context_var_viewname)) i work in this thnaks On Jun 8, 10:54 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > No. Built-in {% url %} tag doesn't sup

Newform and validating of date literals

2008-06-08 Thread n00m
Hi there! Newform validates "22.11.2005" as an invalid date. It requires the US format "2005-11-22". Where and to what this date format should be set for to validate "22.11.2005" as an Ok date string? I tried fiddling with DATE_FORMAT = 'd, m, Y' in settings.py, with no avail. Cheers! --~--~

Re: reversing url tag with viewname as variable in the context

2008-06-08 Thread Alex Koshelev
There is the ticket http://code.djangoproject.com/ticket/7049 On Jun 8, 1:05 pm, ferran <[EMAIL PROTECTED]> wrote: > Thanks Alex for confirm my suspicions > > IMHO this is a great feature for url tag, if anyone have a idea for > implement this functionality, (like a eval(context_var_viewname)) i

Re: MySQL and ë, û, á, etc.

2008-06-08 Thread eelcoh
On Jun 7, 1:05 am, eelcoh <[EMAIL PROTECTED]> wrote: > I have found out that the problem seems to happen on TextFields only. > I do not have a problem with CharFields. > > eelco I fixed it by adding the following to the TextField class in /django/ db/models/db/fields/__init__.py: def get_d

Re: confusing querying

2008-06-08 Thread birkin
On Jun 7, 1:05 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > When in your first example you call `[0]` it replaced earlier > `[22:44]` slicing... I know that is what is actually happening; I was wondering if that is what is supposed to happen, for it seems odd to be able to define, say, two va

Use django0.97 with cmemcached

2008-06-08 Thread mohamed nadir belkhelfa
I want to use cmemcached with Django 0.97 but the import of cmemcached in source code cause the following error Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/mnt/.eggcache/python_libmemcache

Re: Django Suitable for this?

2008-06-08 Thread Richard Dahl
In my opinion, it shouldn't matter what type of web app you are creating, Django is a framework that can be used to develop any kind of app you can imagine. That being said, Django was designed for a particular use and has been tailored for that use, deviating significantly from that type

Re: Multi-table Models and Fixtures

2008-06-08 Thread Greg Taylor
I've submitted a bug about this since I haven't been able to turn up any kind of response. In the mean-time, I've had to rig something up with generic relations to serve the same purpose. It's a really nasty kludge, I think, which is a shame. I can't believe this hasn't cropped up with anyone else

Re: building distributed systems with django?

2008-06-08 Thread lgr888999
Pat: Im pretty sure you can build a twitter clone with django and make it scale pretty well with replication but you still have a single point of failure if the master db gets to much load. Im thinking about simpleDB from amazon. I wonder if that would be a good platform to build something twitte

Importing data from 'MS Access' .mdb files

2008-06-08 Thread M.Ganesh
Hi All, I am looking for tools/methods to read(if possible also write) data from .mdb files which are copied into my linux box with python. I require this for coercing existing legacy data into MySQL with some change in the data structure. The ultimate aim is to replace an application develop

Re: Importing data from 'MS Access' .mdb files

2008-06-08 Thread Jeffrey Johnson
Use access on your Windows PC, Get the ODBC drivers for MySQL, map the tables and copy the data in by hand. Jeff On Sun, Jun 8, 2008 at 10:54 AM, M.Ganesh <[EMAIL PROTECTED]> wrote: > > Hi All, > > I am looking for tools/methods to read(if possible also write) data from > .mdb files which are co

Post count in blog archive month list

2008-06-08 Thread Jason K
So I'm building the archive pages for a blog. In the sidebar I have a list of months that contain posts, linking to the archive month page. I've made an inclusion tag for this which uses Article.objects.dates('pub_date', 'month', order='DESC'). Pretty standard stuff. I'm having a hard time figurin

Re: Newform and validating of date literals

2008-06-08 Thread Adi J. Sieker
n00m wrote: > Hi there! > Newform validates "22.11.2005" as an invalid date. > It requires the US format "2005-11-22". Where and to what this date format should be set > for to validate "22.11.2005" as an Ok date string? I tried fiddling with DATE_FORMAT = 'd, m, Y' > in settings.py, with n

Re: Post count in blog archive month list

2008-06-08 Thread Alex Koshelev
http://www.djangoproject.com/documentation/db-api/#month On Jun 8, 10:32 pm, Jason K <[EMAIL PROTECTED]> wrote: > So I'm building the archive pages for a blog. In the sidebar I have a > list of months that contain posts, linking to the archive month page. > I've made an inclusion tag for this whi

"Global" variables for templates

2008-06-08 Thread Armandas
Hi, I have this issue about some variables that should be available in templates, no matter which view is called. So far I could only think of making a custom function, that would add these variables like so: def render(request, template, context): #variables that should be allways available

Re: "Global" variables for templates

2008-06-08 Thread Adi J. Sieker
Hi, Armandas wrote: > Hi, I have this issue about some variables that should be available in > templates, no matter which view is called. So far I could only think > of making a custom function, that would add these variables like so: > > def render(request, template, context): > #variables

Re: "Global" variables for templates

2008-06-08 Thread Armandas
That's what I was looking for. Thank you! On Jun 8, 8:14 pm, "Adi J. Sieker" <[EMAIL PROTECTED]> wrote: > Hi, > > Armandas wrote: > > Hi, I have this issue about some variables that should be available in > > templates, no matter which view is called. So far I could only think > > of making a cus

Re: building distributed systems with django?

2008-06-08 Thread Ed McCaffrey
Twitter isn't a good candidate for simply creating a cache and replicating your database. I'll just post a link, since it goes along with my own thoughts. http://ayende.com/Blog/archive/2008/06/03/Architecting-Twitter.aspx On Sun, Jun 8, 2008 at 12:32 PM, lgr888999 <[EMAIL PROTECTED]> wrote: >

Re: Remove empty value ('---------') from HTML SELECT choices

2008-06-08 Thread Berco Beute
Great! A cleaner solution. Thanks! Is there any effort underway for making overriding default widgets simpler? I think that's really needed (especially for beginner like me). 2B On Jun 8, 1:20 am, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote: > On Jun 7, 4:18 pm, Berco Beute <[EMAIL PROTECTED]>

clean_, EDIT versus CREATE case.

2008-06-08 Thread Adi
I have a UserForm that is a modelform on the model User. I have a method called clean_username(). The purpose of this method is ensure that the username that the user picks while creating a User object is not taken. So this works great when a new user is created. I also use the same form on my ed

template system and subdirs

2008-06-08 Thread vjanicek
hey there people... I'm a long time python programmer starting to use django. I have a problem with the template system. I'm loading the template in the settings.py file inside TEMPLATE_DIR and it works perfectly even using render_to_response. The problem is that the template I'm using has many s

Re: template system and subdirs

2008-06-08 Thread Juan Hernandez
sorry, I already found out. I thought that I was able to load static content off django and I was wrong here's the answer http://www.djangoproject.com/documentation/static_files/ On Mon, Jun 9, 2008 at 5:23 PM, vjanicek <[EMAIL PROTECTED]> wrote: > hey there people... > > I'm a long time python

unsubscribe?

2008-06-08 Thread circularfunc
how do i unsubscribe? --~--~-~--~~~---~--~~ 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 email to [EMAIL PROTE

Re: unsubscribe?

2008-06-08 Thread Karen Tracey
On Sun, Jun 8, 2008 at 7:53 PM, <[EMAIL PROTECTED]> wrote: > > how do i unsubscribe? > > > To unsubscribe from this group, send email to [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: unsubscribe?

2008-06-08 Thread Juanjo Conti
[EMAIL PROTECTED] escribió: > how do i unsubscribe? > --~--~-~--~~~---~--~~ > 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 fro

Re: Importing data from 'MS Access' .mdb files

2008-06-08 Thread bacccr
also, you can export your data from access to xml (within vb) file and then load it into your mysql db with python. there is a lot of options, select the way you familiar with. On 9 июн, 04:30, "Jeffrey Johnson" <[EMAIL PROTECTED]> wrote: > Use access on your Windows PC, Get the ODBC drivers for

Re: Multi-table Models and Fixtures

2008-06-08 Thread Russell Keith-Magee
On Mon, Jun 9, 2008 at 12:09 AM, Greg Taylor <[EMAIL PROTECTED]> wrote: > > I've submitted a bug about this since I haven't been able to turn up > any kind of response. In the mean-time, I've had to rig something up > with generic relations to serve the same purpose. It's a really nasty > kludge,

Re: Importing data from 'MS Access' .mdb files

2008-06-08 Thread Julien
The MySQL migration toolkit has worked quite well for me: http://www.mysql.com/products/tools/migration-toolkit/ On Jun 9, 10:23 am, bacccr <[EMAIL PROTECTED]> wrote: > also, you can export your data from access to xml (within vb) file and > then load it into your mysql db with python. there is a

Re: upload is working, but how to store the path in the imagefield?

2008-06-08 Thread chefsmart
Sorry for bumping own thread, but a simple working example would really help me. On Jun 8, 11:08 am, chefsmart <[EMAIL PROTECTED]> wrote: > Hi, can someone help me with the following please: - > > I have a newform with an imagefield. The upload is working fine [using > save_FOO_file(filename, ra

Re: Importing data from 'MS Access' .mdb files

2008-06-08 Thread chefsmart
You may follow these steps: 1. install the MySQL ODBC connector (currently version 5.1) 2. create an empty database 3. create a DSN pointing to your newly created empty database 4. open your .mdb file in Access 5. select your table in Access and go to File->Export... 6. In the "save as type", cho

Re: How to execute function dynamically?

2008-06-08 Thread David.D
If there are no parameters, it works fine in django. For example: def functionA(): # no parameter ... return ... def functionB(): # no parameter return ... callDict = {'functionA': functionA, 'functionB':functionB,...} def myview(request, indata): func = callDict.get(in