Re: custom template tags and template loaders

2009-07-30 Thread chefsmart
There is absolutely no difference between my dev and production, only the database details in the settings.py are different. The 'django.template.loaders.app_directories.load_template_source' is not included in both my dev as well as my production setups (which is in testing phase now). So since

Re: permalink don't works

2009-07-30 Thread gentlestone
Thank you very much - seems the ambiguous urls was the reason - a bit less confusing exception would be bettrer I think. I reworked the code (whitout generic views for sure) and now the permalinks work. --~--~-~--~~~---~--~~ You received this message because you ar

Re: permalink don't works

2009-07-30 Thread gentlestone
I found this text on the tutorial page http://docs.djangoproject.com/en/dev/ref/models/instances/ - ...you could reference this using permalink() as follows: @models.permalink def get_absolute_url(self): return ('archive_view', (), {

Error in connecting mysqldb

2009-07-30 Thread rekha
Hi, i have started using django for the past 5 days..i want my applicaion to access database(mysql). i tried the steps given in the django book. when i try to do that im getting the following error.. how to fix this? or suggest me the entire step by step procedure to install mysqldb.. f...@f

Re: Help with Test Client, Templates and Context

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 12:06 AM, mviamari wrote: > > I'm trying to use the test client to verify my views, but when I check > the templates and contexts I get 'None' returned instead of the > context dict or the template. I do get the correct content and status > code however. I was hoping som

Re: Error in connecting mysqldb

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 3:30 AM, rekha wrote: > > Hi, i have started using django for the past 5 days..i want my > applicaion to access database(mysql). i tried the steps given in the > django book. when i try to do that im getting the following error.. > how to fix this? or suggest me the entir

Re: templatetag issue

2009-07-30 Thread chefsmart
I have a similar discussion running on http://groups.google.com/group/django-users/browse_frm/thread/989c569d5118980d But the workaround I posted in post no. 2 above works for me, I don't know why it didn't for Daymien. @Daymien: - When trying out my workaround, try to comment out 'django.templa

Re: custom template tags and template loaders

2009-07-30 Thread chefsmart
Daymien has a similar issue at http://groups.google.com/group/django-users/t/7b7dad85530eceed Just wanted to link the two discussions. On Jul 30, 12:11 pm, chefsmart wrote: > There is absolutely no difference between my dev and production, only > the database details in the settings.py are dif

Re: templatetag issue

2009-07-30 Thread Daymien
Jippii, I got the solution :-) I don't no why this problem only appear with mod_python or mod_wsgi with apache and not with the build in webserver, but now it works! The problem was that the app were not in the python search path. So either you include your app to python include path or you chang

Re: custom template tags and template loaders

2009-07-30 Thread Daymien
Hi guys, I got the solution for me. Read here: http://groups.google.com/group/django-users/browse_thread/thread/7b7dad85530eceed/63be3eb5e41ce9f0#63be3eb5e41ce9f0 regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: I need to get psycopg2 installed on Mac OS X 10.5

2009-07-30 Thread Vasil Vangelovski
There's a package of PostgreSQL called postgresplus that comes with postgis, pgadmin etc. It's pretty easy to set up on os x: http://www.enterprisedb.com/products/postgres_plus/overview.do Installing psycopg2 after I've installed postgresplus has always worked for me with minimum effort, see this:

dictionaries in template

2009-07-30 Thread Salvatore Leone
Hi, I pass to my template a dictionary of answer -> [attach_list] so the data structure is answers_list[answer] = attach_list Inside the template I actually can read the answers: {% for answer in answers_list.keys %} #use the answer object # answer_list.answer returns a attach list

Re: dictionaries in template

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 11:14 +0200, Salvatore Leone wrote: > Hi, > > I pass to my template a dictionary of answer -> [attach_list] > > so the data structure is > > answers_list[answer] = attach_list > > > Inside the template I actually can read the answers: > > {% for answer in answers_list.

Re: Load order for fixtures

2009-07-30 Thread Aaron
For the archives, there's some actually useful information here: http://code.djangoproject.com/ticket/3615 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: How to send form via email

2009-07-30 Thread Eugene Mirotin
So put join's arguments in a list or tuple On Jul 29, 5:47 pm, el_k...@interia.pl wrote: > Thank you for your answer but there is error > "join() takes exactly one argument (3 given)" > > "Jeremy Boyd" pisze: > > > > > > > Kolo, > > > I'm not positive this is what you're asking, but it seems to

Long Poll in Django

2009-07-30 Thread aleph
Hi! Is it possible to use Django with longpoll technique? What I mean is a client (probably Flex client) which sends a request to server and start recieving data 'forever' - until timeout or something. The django application on server has polling loop or some producer/ customer threads inside -

[SOLVED]Re: dictionaries in template

2009-07-30 Thread Salvatore Leone
> {% for answer,value in answers_list.items %} > > it works, thanks! -Salvatore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: sqlite error: Encrypted or Not a Database

2009-07-30 Thread Art
Thanks, that was it. Art On Jul 29, 10:31 pm, Alex Gaynor wrote: > On Wed, Jul 29, 2009 at 9:06 PM, Art wrote: > > > I have created a Django usingsqliteas the database, and everything > > works fine. But when I try to open the database usingsqlitedirectly > > rather than through Django: > >sqlit

MEDIA_URL MEDIA_ROOT

2009-07-30 Thread Salvatore Leone
Hi again, I have configured MEDIA_ROOT = '/home/testpec/public_html/pecwizard/uploads/' and the file uploads works fine, so in the 'uploads' directory there are all my uploaded files. Two questions: 1. in models.py I have the following: class Attach(models.Model): attached_file = models.F

custom admin actions

2009-07-30 Thread selcukcihan
Hi, i have django 1.1 I have a user profile model, call it OurUser. I have defined a custom action, "send mail". This action is available in OurUser and django auth's User models. It is handled via a global function with this signature def send_mail_to_users(modeladmin, request, queryset): s

Removing objects with many-to-many relationship

2009-07-30 Thread rudy
Hello, everyone! I'd like to remove some object with many-to-many relationship from Django admin interface. Standard removing also removes all related objects and the list of removed objects displayed on confirmation page. But I don't need to remove related objects! Assume we have ContentTopic a

Django Forms with Foreign Key

2009-07-30 Thread kimo
Hi, I have 2 models in django, and im also using ModelForm, my question is the second model have a froreignkey of the 1, and i want to have one page when generating the form. It's possible, how to link the two forms in one page. Class Event(models.Model): id = models.AutoField(primary_key=True)

Handle event on a django event Calendar

2009-07-30 Thread kimo
Hi, Is there a way to have a django Clandar Event, i have a Event model, and i want to display the event information on the calendar in order to know if the organiser is free or busy on the date event. Many Thanks. I didn't find the Django Calendar. Where can i find some good example please ?

Re: Removing objects with many-to-many relationship

2009-07-30 Thread Steve Schwarz
On Thu, Jul 30, 2009 at 6:47 AM, rudy wrote: > > Hello, everyone! > > I'd like to remove some object with many-to-many relationship from > Django admin interface. Standard removing also removes all related > objects and the list of removed objects displayed on confirmation > page. But I don't nee

Re: Handle event on a django event Calendar

2009-07-30 Thread Steve Schwarz
On Thu, Jul 30, 2009 at 6:41 AM, kimo wrote: > > Hi, > > Is there a way to have a django Clandar Event, i have a Event model, > and i want to display the event information on the calendar in order > to know if the organiser is free or busy on the date event. > > Many Thanks. > > I didn't find the

Re: Handle event on a django event Calendar

2009-07-30 Thread kimo
Thank you. I will have a look. On Jul 30, 2:14 pm, Steve Schwarz wrote: > On Thu, Jul 30, 2009 at 6:41 AM, kimo wrote: > > > Hi, > > > Is there a way to have a django Clandar Event, i have a Event model, > > and i want to display the event information on the calendar in order > > to know if t

Re: dictionaries in template

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You are overwriting the 'answer' key every time. So there is only one key called 'answer'. Try editing it so you make the 'answer' key a list of the 'attach_list's, that is one possible solution. Or possibly do you mean to use if loops in the templat

Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread prabhu S
Hi All, I am not noticing a weird issue in django 1.1. When DEBUG is true in settings and if I try a non-existent url, django shows me a friendly 404 page. Now I create 404.html and 500.html and place this in templates directory. Then If I turn off debug and try a non-existent url, I expect to se

Re: Long Poll in Django

2009-07-30 Thread prabhu S
long poll, push ajax, comet wow too many names for this!!! It will be interesting to study http://code.google.com/p/pygowave-server/ and find out how they implement this. Regards, Prabhu On Jul 30, 10:52 am, aleph wrote: > Hi! > > Is it possible to use Django with longpoll technique? What I mea

Custom captcha

2009-07-30 Thread gabon
I'm evaluating the, probably crazy, idea to build a custom captcha, to have it more related to the website. I created a subclass of forms.CharField where on creation I choose the random content and show, for testing purposes, a related label. The problem I'm having is that when the request is 200,

Re: captcha

2009-07-30 Thread gabon
It seems I've problem installing the recaptcha client library. After the setup I still get "no module named captcha" after the import. Funny enough after the installation it didn't create the captcha folder in the python site-packages folder :S Cheers, chr On Jul 29, 7:45 pm, "Gabriel ." wro

Re: templatetag issue

2009-07-30 Thread chefsmart
I had something like INSTALLED_APPS = ( 'my_django_app',) in my settings.py. I changed it to INSTALLED_APPS = ( 'my_django_project.my_django_app',) and it set things right. On Jul 30, 1:11 pm, Daymien wrote: > Jippii, > I got the solution :-) > > I don't no why this problem only appear with mod

Re: How can I reload attributes from the database

2009-07-30 Thread Fleg
Nobody knows ? On Jul 29, 6:12 pm, Fleg wrote: > Hi, > I have a model mapping tables in a database with several foreign keys. > > class Scheduler(models.Model): >         id_schedule = models.AutoField(primary_key=True) >         id_parent = models.ForeignKey > ("Scheduler",db_column='id_parent'

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 8:40 AM, prabhu S wrote: > > Hi All, > > I am not noticing a weird issue in django 1.1. When DEBUG is true in > settings and if I try a non-existent url, django shows me a friendly > 404 page. Now I create 404.html and 500.html and place this in > templates directory. Then

Re: How can I reload attributes from the database

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 9:10 AM, Fleg wrote: > > Nobody knows ? > Simply re-get the instance from the DB? Karen > > On Jul 29, 6:12 pm, Fleg wrote: > > Hi, > > I have a model mapping tables in a database with several foreign keys. > > > > class Scheduler(models.Model): > > id_schedu

introspecting templates

2009-07-30 Thread perrin
Hi, I'd like to determine what data a template uses, in order to optimize my database access for some large queries. The idea is to fetch as much as possible in a single query up front. Is there any API for looking at the tags used in a template? If not, I was thinking of passing in a custom C

Re: captcha

2009-07-30 Thread gabon
this recent tutorial helped me: http://www.marcofucci.com/tumblelog/26/jul/2009/integrating-recaptcha-with-django/ chr On Jul 30, 1:30 pm, gabon wrote: > It seems I've problem installing the recaptcha client library. > > After the setup I still get "no module named captcha" after the > import.

Re: problem: TemplateDoesNotExist at /admin/ (linux)

2009-07-30 Thread monkut
Hmmm... I'm having the same error. I just installed 1.1 with python 2.6.2, on Windows vista. I set up a new project using django-admin.py and a new app to throw together a new project. All in all that took under an hour from download. Now, I've spent just about an hour looking around to find out

Re: problem: TemplateDoesNotExist at /admin/ (linux)

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 9:59 AM, monkut wrote: > > Hmmm... I'm having the same error. > I just installed 1.1 with python 2.6.2, on Windows vista. > > I set up a new project using django-admin.py and a new app to throw > together a new project. > All in all that took under an hour from download. >

Missing Roles (group of groups)

2009-07-30 Thread Thomas Guettler
Hi, The models from django.contrib.auth look like unix /etc/passwd and /etc/groups files. But roles are more flexible: A role contains roles. A user is a role. Are there any other django coders who miss this? I know that this can be implemented with only a few lines. But a reusable solution wo

howto get value of model instance in form.py

2009-07-30 Thread Shuge Lee
http://dpaste.com/73301/ --~--~-~--~~~---~--~~ 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 django-u

Re: howto get value of model instance in form.py

2009-07-30 Thread Shuge Lee
# in models.py class Seed(models.Model): name = models.CharField(max_length=128) UPLOAD_ROOT = 'uploads' files = models.FileField(upload_to=UPLOAD_ROOT, blank=True, null=True) source = models.CharField(max_length=256, blank=True, null=True) def __unicode__(self): retu

Subclassing CharField

2009-07-30 Thread Michael Anckaert
Hello everyone, I subclassed the CharField but have run into this problem: In the form HTML output, the label is ok (it used the verbose_name of the model field as expected), but the form validation error message uses 'None' as the field name/label. Appearantly it doesn't know the fields verbose

Re: Missing Roles (group of groups)

2009-07-30 Thread Adam Stein
I could certainly use it if available. On Thu, 2009-07-30 at 16:05 +0200, Thomas Guettler wrote: > Hi, > > The models from django.contrib.auth look like unix /etc/passwd and /etc/groups > files. > > But roles are more flexible: A role contains roles. A user is a role. > > Are there any other d

Re: Long Poll in Django

2009-07-30 Thread Vasil Vangelovski
I've used orbited with success for this purpose: http://www.orbited.org/ But getting started integrating it with your django project is not very straightforward. On Thu, Jul 30, 2009 at 11:52 AM, aleph wrote: > > Hi! > > Is it possible to use Django with longpoll technique? What I mean is a > cl

django.views.generic.list_detail.object_list and coltrane url reverse lookups

2009-07-30 Thread andreas schmid
hi to all, im going through the practical django projects and i arrived at the part where im setting up generic views for the object listing of the categories. my problem now is that i have the navigation in the base.html which creates (or should) the url with Categories my urls.categories.

Re: how save data into more than one table?

2009-07-30 Thread Asinox
Thanks, i did it, i dont know if in the best way but im saving data in two tables :) thanks :) On Jul 30, 12:47 am, Asinox wrote: > Thanks a lot Mike, very nice help, you example helpe me with another > thing :) good!!! > > now, when i said "key" (sorry!!) i want to say "some code like an > en

Re: Comment Detail URI

2009-07-30 Thread grElement
I guess what I'm really looking for is someone who has an example of a reverse() lookup for generic relationships like the ones created in the django comments, just to be clear. Maybe this is just one of those instances where I need to write the query in SQL? Since I'm a django noob, I wanted to

Save FormWizard Data to MySQL

2009-07-30 Thread 10000angrycats
Bit of a basic one this: FormWizard generates a list object which doesn't have a save(). What's the simplest code to insert in the sample doc example (http://docs.djangoproject.com/en/1.0/ref/contrib/ formtools/form-wizard/) to save to a mysql database? The relevant spot: from django.http import

Application Template on top of Django

2009-07-30 Thread n179911
Hi, I am new to Django. Can you please tell me if there is sample application template which builds on top of Django? Like of like 'AppFuse' http://appfuse.org/ in Java World. What I mean is, for common webapp, I need to have * user registration * password recovery * user log in/log out * chec

NASA is using Django for their NEBULA project

2009-07-30 Thread mhanb...@teksystems.com
Hello Django devs! I'm supporting NASA on their NEBULA project and they're looking for Python / Django experts to join their team here in Mountain View, CA. If you're interested, let me know and we can talk more on how they're using Django in their environment! Thanks, Mehdi --~--~-~

Re: Application Template on top of Django

2009-07-30 Thread Alex Gaynor
On Thu, Jul 30, 2009 at 11:52 AM, n179911 wrote: > > Hi, > > I am new to Django.  Can you please tell me if there is sample > application template  which builds on top of Django? Like of like > 'AppFuse' http://appfuse.org/ in Java World. > > What I mean is, for common webapp, I need to have > * u

Re: ANN: Django 1.1 released!

2009-07-30 Thread Mat Clayton
huge congrats, everyone! Been running on trunk for a while now, loving it! On Wed, Jul 29, 2009 at 6:16 PM, matt barto wrote: > > Congrats! Can't wait to try it out. Thanks for all the hard work. > > On Jul 28, 11:23 pm, James Bennett wrote: > > Tonight we're extremely proud to announce the r

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread prabhu S
Hi Karen, Thanks for replying. I have put my 404.html in the same place as that of 500.html. To make sure, I even copy pasted 500.html and changed the error message text alone. Here is an output from the django development server, when I tried to access "sdfsa" (Invalid url) [30/Jul/2009 18:25:

Re: Comment Detail URI

2009-07-30 Thread Daniel Roseman
On Jul 30, 4:29 pm, grElement wrote: > I guess what I'm really looking for is someone who has an example of a > reverse() lookup for generic relationships like the ones created in > the django comments, just to be clear. > > Maybe this is just one of those instances where I need to write the > qu

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I think I located your problem. In file invoicy / guidy / urls.py You should change the first url pattern to read: url(r'^/$', 'guidy_default', name='guidy-default'), instead of: url(r'^$', 'guidy_default', name='guidy-default'), That should f

Re: Help with Test Client, Templates and Context

2009-07-30 Thread mviamari
On Jul 30, 12:40 am, Karen Tracey wrote: > On Thu, Jul 30, 2009 at 12:06 AM, mviamari wrote: > > > I'm trying to use the test client to verify my views, but when I check > > the templates and contexts I get 'None' returned instead of the > > context dict or the template.  I do get the correct co

Re: NASA is using Django for their NEBULA project

2009-07-30 Thread Juan Hernandez
a headhunter is flying around!! BTW teksystems hates me :) On Thu, Jul 30, 2009 at 12:24 PM, mhanb...@teksystems.com < mhanb...@teksystems.com> wrote: > > Hello Django devs! > > I'm supporting NASA on their NEBULA project and they're looking for > Python / Django experts to join their team here

Re: introspecting templates

2009-07-30 Thread Daniel Roseman
On Jul 30, 2:25 pm, perrin wrote: > Hi, > > I'd like to determine what data a template uses, in order to optimize > my database access for some large queries.  The idea is to fetch as > much as possible in a single query up front.  Is there any API for > looking at the tags used in a template?  I

Re:

2009-07-30 Thread Margie
Hi Vasil, Could you clarify how I access the variable from the javascript? For example, using my DateWidget as an example, say in my wdigets.py I have this (note I've added ?myVar='xyz' in second line: class DateWidget(widgets.DateInput): class Media: js = ("js/jquery.datePicker.min

Re: Comment Detail URI

2009-07-30 Thread grElement
> I've read through the two posts above several times now and I'm still > not at all clear what you're asking for. What do you mean by 'queryset > for a particular comment'? A comment isn't associated with a queryset, > it's associated with a particular instance. You're right worded badly and wh

Re:

2009-07-30 Thread Jim Garrison
> But what do you do for a widget where the jquery function being called > requires an argument.  For example, I have an autocomplete widget that > takes as a "prePopulate" argument that contains the value it should > initialized with. Have you considered using the jquery metadata plugin? It sho

Template links when Django not domain root

2009-07-30 Thread Streamweaver
I have a django project that has worked just fine in development but I'm trying to move it to a demo site and the application is not on a root domain or sub-domain. Instead the site root URL is suppose to be something like https://site.domain.com/appname/ This is causing all my template links to

Re:

2009-07-30 Thread Daniel Roseman
On Jul 30, 7:41 pm, Margie wrote: > Hi Vasil, > > Could you clarify how I access the variable from the javascript?  For > example, using my DateWidget as an example, say in my wdigets.py I > have this (note I've added ?myVar='xyz' in second line: > > class DateWidget(widgets.DateInput): >     cla

How to save a model...

2009-07-30 Thread zayatzz
... Hello! I have a model (profile) which's only required field is its foreignkey - django.contrib.auth.User. Following the example of forementioned model and its manager i created manager for the profile: class ProfileManager(models.Manager): def create_profile(self, username):

model inheritance problem

2009-07-30 Thread Unnamed_Hero
Here is my problem. I have a database already filled with some sort of data. I have several tables with "some code" - "value" (without any primary keys at all, but codes are unique). Also there is a table (called c12b) with a "some thing" "note_1", "note_2" "code_1" "code_2", where code_1, code_2

Re: Template links when Django not domain root

2009-07-30 Thread Alex Koshelev
If you are using `{% url %}` template tag or `reverse` function you can set FORCE_SCRIPT_NAME [1] settings variable specified for your deployment project root. Or working with right web-server in front of django project force it to tell proper SCRIPT_NAME himself. [1]: http://docs.djangoproject.co

how encrypt datetime.now with python?

2009-07-30 Thread Asinox
hi guys, i want to encrypt the "datetime.now()" , im try with base64 but base64 need string... how ill encrypt ? Thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: how encrypt datetime.now with python?

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 convert it to a string: str(datetime.now()) Luke luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire Asinox wrote: > hi guys, i want to encrypt the "datetime.now()" , i

Re: how encrypt datetime.now with python?

2009-07-30 Thread Adam Peacock
That will work, as long as the parent doesn't need to go back into a native object easily - if s/he needs to easily get back into a datetime object, use pickle: import pickle import base64 toEncode = pickle.dumps(datetime.now()) encoded = base64.encodestring(toEncode) decoded = base64.decodestr

Re: how encrypt datetime.now with python?

2009-07-30 Thread Asinox
Thanks a lot guys :) --~--~-~--~~~---~--~~ 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 django-user

Re: Missing Roles (group of groups)

2009-07-30 Thread Torsten Bronger
Hallöchen! Thomas Guettler writes: > [...] > > Are there any other django coders who miss this? Yes. Although groups are not too simple for my purposes, roles would make it trivial. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: torsten.bron...@ja

Re:

2009-07-30 Thread Margie
Ah - ok, I finally see what you are saying. Sorry, I somehow began thinking there was some additional "GET" happening that I just really didn't understand. I didn't understand that "src" was referring to the "src" in the tag. My world had become very confused. Ok, the world is back to one tha

Re: Subclassing CharField

2009-07-30 Thread Xiong Chiamiov
On Jul 30, 7:27 am, Michael Anckaert wrote: > Hello everyone, > > I subclassed the CharField but have run into this problem: How did you subclass CharField? It's difficult to say what the problem is without seeing what you've done. --~--~-~--~~~---~--~~ You recei

Re:

2009-07-30 Thread Margie
Are you referring to $.data()? I think that's a great solution. I could attach my data to the tag that the autocomplete is associated with, and then in my jquery function that finds all of those tags and then calls the autocomplete plugin on them, just pull off the stored initialization data a

Re: MEDIA_URL MEDIA_ROOT

2009-07-30 Thread Xiong Chiamiov
On Jul 30, 3:38 am, Salvatore Leone wrote: > I can't download the files, probably I don't understand the MEDIA_URL > parameter. Here it is: > MEDIA_URL = 'http://localhost:8000/wiz/uploads/' > > but trying to access the files returns me a 404 error. You shouldn't have to use MEDIA_URL at all for

Re: Oracle 11g + mod_wsgi + Apache + Django on Windows 2003 does not work

2009-07-30 Thread Xiong Chiamiov
On Jul 29, 11:57 am, tcpipmen wrote: > Hi All, I have no problem running Oracle 11g with django on build-in > development server and everything is fine.  But When I setup with > mod_wsgi with Apache I'm getting messages like below [snip] > The specified module could not be found. I'm not quite s

Re: MEDIA_URL MEDIA_ROOT

2009-07-30 Thread cootetom
If you are using the django development server whilst developing then you can use django.views.static.serve to download static or media files. You should not use this method in production however as it is not considered stable. Just place this in your url.py file: from settings import DEBUG, STAT

Re: about a web site

2009-07-30 Thread Lic . José M . Rodriguez Bacallao
second one, any advice? On 7/17/09, Diego Eduardo Ahumada - SICO S.I. S.A. wrote: > > 2009/7/17 Michael : >> On Fri, Jul 17, 2009 at 1:30 PM, Lic. José M. Rodriguez Bacallao >> wrote: >>> >>> anyone? >>> >>> >>> On 7/17/09, Lic. José M. Rodriguez Bacallao wrote: >>> > hi folks, it's be a long

Re: how save data into more than one table?

2009-07-30 Thread derek
How about posting the code here for a review? On Jul 30, 5:21 pm, Asinox wrote: > Thanks, i did it, i dont know if in the best way but im saving data in > two tables :) thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

clean_() doesn't handle images?

2009-07-30 Thread Martje
Hey, I've got the following code in my models.py: from django import forms class Foto(models.Model): omschrijving = models.CharField(max_length=100) afbeelding = models.ImageField(upload_to='media/afbeeldingen/ header/fotos') def clean_afbeelding(self): raise forms.Validatio

Is it possible to combine these two queries?

2009-07-30 Thread David
Hi, I have two queries as follows. al_1 = Alert.objects.filter(creation_date__regex=today).values ('dimension1').annotate(Sum('metric1')).order_by('dimension1') and al_2 = Alert.objects.filter(creation_date__regex=yesterday).values ('dimension1').annotate(Sum('metric1')).order_by('dimension1'

overriding clean method on ModelForm class

2009-07-30 Thread sico
Hey, I had a problem recently that caused me some confusion! I have a model that has a OneToOne field as the primary key. When adding a new record in the admin form and entering a key that already existed, I wasn't getting the expected "record already exists" error, instead it was just overwrit

Re: view/form with fields from multiple models

2009-07-30 Thread sico
Hey, I've been a little distracted but I'm back on to this now... Thanks for the information, I'm going to try it out now (assuming no more interruptions!) and I'll get back to you on how I get on... On Jul 24, 8:55 pm, Matthias Kestenholz wrote: > On Fri, Jul 24, 2009 at 10:46 AM, Benjamin

user in template tag without passing it

2009-07-30 Thread Jake
Hey all, I have a custom template tag like this currently {% extras user.is_authenticated %} basically it returns the results of a different template based on whether the arg is true (user.is_authenticated) I want to make it simpler, just {% extras %} and have the code inside be able to access u

Re:

2009-07-30 Thread Vasil Vangelovski
Hi I've hacked up something quick which will work in most simple cases, but I don't suggest you use the same code as it is. It's just to show you an example of how this can be done. This is the html markup: http://dpaste.com/hold/73500/ And this is the js with jquery: http://dpaste.com/hold/73

multiple admin forms for one model

2009-07-30 Thread sico
Is it possible to have more than one admin interface for a form in the same AdminSite ? I'd like to have an admin form for just editing the model, and another one for editing the model and some sub-records. Is this possible within the same AdminSite ?? You're not allowed to do more than one: a

Weird character shifting in mod_python

2009-07-30 Thread Andrew
We get these incredibly bizarre errors every once and a while where a single character of python gets transformed. The code itself isn't changing, and the area where it pops up changes each time. Any ideas? MOD_PYTHON ERROR ProcessId: 28165 Interpreter:'' ServerName: '*' Do

ANN: django-forms-builder

2009-07-30 Thread opensou...@citrus.com.au
Hello django-users, My company has allowed me to open source a small django application I've built that I've named django-forms-builder. What it does is allow admin users to create their own front-end website forms for capturing data. I've chosen google code to host the project and welcome any

Create a web application

2009-07-30 Thread susanne
Hello Mr.pallavi, Mr.George and other members, I have similar application like palavi. I followed this hints but not success. Please let me know how did you proceed. my python application has functions to perform different calculations. 1) The program reads input file called IN.txt. the IN.txt f

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread prabhu S
Hi Luke, Thanks for your email. The particular source is already fine with no /. I also tried adding slash assuming you swapped the particular line in your email. Can you give another shot and let me know if you can spot something? Regards, Prabhu On Jul 30, 6:46 pm, Luke Seelenbinder wrote:

Re: Oracle 11g + mod_wsgi + Apache + Django on Windows 2003 does not work

2009-07-30 Thread tcpipmen
thanks for your reply. i removed oracle 11g and installed 10g express. uninstalled python 2.6 and everything related. and now it is working. so i'm not sure it has to do with 11g??? i just need to test with 11g again in current setup. regards, On Jul 30, 5:23 pm, Xiong Chiamiov wrote: > On J

Re: custom admin actions

2009-07-30 Thread Vasil Vangelovski
You can get the model class for the modeladmin, it's the model property. So modeladmin.model will give you the model class. You can just do a check of equality modeladmin.model == OurModel. On Thu, Jul 30, 2009 at 1:22 PM, selcukcihan wrote: > > Hi, i have django 1.1 > > I have a user profile mod

Re: clean_() doesn't handle images?

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 4:02 PM, Martje wrote: > > Hey, > > I've got the following code in my models.py: > > from django import forms > class Foto(models.Model): >omschrijving = models.CharField(max_length=100) >afbeelding = models.ImageField(upload_to='media/afbeeldingen/ > header/fotos'

Simple query on a ManyToMany field?

2009-07-30 Thread Adam Olsen
Suppose I have the following models: class Tag(models.Model): card = models.ForeignKey('Card') name = models.CharField(max_length=10) class Card(models.Model): # whatever Say I have a list, like the following: words = ['christmas', 'mother'] This list can be of variable length. How

Custom Manage.py Commands

2009-07-30 Thread mviamari
I'm trying to create a custom manage.py command for my project. The example in the documentation only shows how to do this for custom commands inside of an app. Is it possible to do the same at the project level? I'm currently specifying a Command class in a module file within a management/comm

Re: Simple query on a ManyToMany field?

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 18:14 -0600, Adam Olsen wrote: > Suppose I have the following models: > > class Tag(models.Model): > card = models.ForeignKey('Card') > name = models.CharField(max_length=10) > > class Card(models.Model): > # whatever > > Say I have a list, like the following: w

Re: Custom Manage.py Commands

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 17:18 -0700, mviamari wrote: > I'm trying to create a custom manage.py command for my project. The > example in the documentation only shows how to do this for custom > commands inside of an app. Is it possible to do the same at the > project level? The concept doesn't par

Re: Custom Manage.py Commands

2009-07-30 Thread mviamari
On Jul 30, 5:24 pm, Malcolm Tredinnick wrote: > On Thu, 2009-07-30 at 17:18 -0700, mviamari wrote: > > I'm trying to create a custom manage.py command for my project.  The > > example in the documentation only shows how to do this for custom > > commands inside of an app.  Is it possible to do th

Re: Simple query on a ManyToMany field?

2009-07-30 Thread Adam Olsen
On Thu, Jul 30, 2009 at 6:21 PM, Malcolm Tredinnick wrote: > I've written a couple of solutions for this over the years. Here's a > summary of some of them: > > http://www.pointy-stick.com/blog/2009/03/10/using-djangos-aggregation-features/ > That did it, thanks! -- Adam Olsen http://www.vimtip

  1   2   >