Re: How to call a .htm page without going to the views.py file?

2007-09-21 Thread jake elliott
hi greg - you're looking for this: http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-direct-to-template best jake Greg wrote: > Ok, > Very easy question here. Is there anyway that I can directly call > my .htm file from within my urls.py file? > > Now, I

How to call a .htm page without going to the views.py file?

2007-09-21 Thread Greg
Ok, Very easy question here. Is there anyway that I can directly call my .htm file from within my urls.py file? Now, I have the following: (r'^customer_care/$', 'mysite.rugs.views.customer_care'), def customer_care(request): return render_to_response('customer_care.html', {})

Do the FreeIpods, FreeFlatScreens, FreeHandBags "scams" really work?

2007-09-21 Thread ryoma
Ok, if you are like me you have heard so much about the FreeIpods and FreeFlatScreens websites on different forums, blogs, IM's, etc, you are about to puke. So am I. But yet the draw of getting an Ipod for doing basically nothing is pretty strong. I dismissed all the "stories" of people

Re: Chaining custom manager methods on querysets

2007-09-21 Thread omat
Thanks a lot for the explanation. Now it is much clearer for me... On 21 Eylül, 19:18, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 9/21/07, omat <[EMAIL PROTECTED]> wrote: > This: > > > class TagManager(models.Manager) > > # ... > > def get_query_set(self): > > return

Extract hour, minute and second equivalent for django.db

2007-09-21 Thread [EMAIL PROTECTED]
Hi everyone, Im new here. I needed to write a query similar to News.objects.filter(publish_date__hour = 12) and found out that some query terms (namely hour,minute and second) are not supported by filter but are supported by all database backends. (unless im terribly wrong, just looked at the

JOIN THE HOTTEST GROUP ON THE NET !!!! OVER 10,000 JOIN WEEKLY FREE SIGN UP!

2007-09-21 Thread dating the right mate
JOIN THE HOTTEST GROUP ON THE NET OVER 10,000 JOIN WEEKLY FREE SIGN UP! http://www.blpurl.com/al42 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

multiple-db-support: reference model using different database

2007-09-21 Thread Carlos Hanson
Greetings, I would like to reference a model in another database. I see that the TODO list on MultipleDatabaseSupport in the code wiki has the following: When validating models, warn user if a model references another model that is configured to use a different connection DONE I started

Re: MEDIA_URL and the trailing slash (and a broken pipe or two)

2007-09-21 Thread SmileyChris
I don't see how it would break on your production server as long as you have a trailing slash in the server's media_url too. On Sep 21, 5:05 pm, Dave Lowe <[EMAIL PROTECTED]> wrote: > I agree by the way, MEDIA_URL should always have a trailing slash. > Does anyone know why the documentation says

Re: MEDIA_URL

2007-09-21 Thread Michael
Hi Jacob, On Sep 22, 3:51 am, jacoberg2 <[EMAIL PROTECTED]> wrote: > Hey quick question, what exactly is the media_url setting and what do > you have to do to get the right url? >From http://www.djangoproject.com/documentation/settings/#media-url: MEDIA_URL Default: '' (Empty string) URL

django's http server error

2007-09-21 Thread Przemyslaw Gawronski
Hi, I'm running currently django from svn version 6399 on FC7 with postgresql. With every request I'm getting this error (it's happening for the last few svn updates): Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 279, in run

Re: What's wrong with this decorator?

2007-09-21 Thread Michael
Hi Linan, On Sep 22, 3:38 am, Linan <[EMAIL PROTECTED]> wrote: > Hi all, > > I just wrote a decorator to validate if an object(say Blog) exists: > > def require_blog_item_exists(func): > def _decorated_func(request, blog_id, *args, **kwargs): > try: > blog =

Windows XP tips and tricks

2007-09-21 Thread John Travolta
Learn how to repair, speed up and tweak your Windows XP http://windowsxpsp2pro.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

File uploading problems

2007-09-21 Thread jacoberg2
I tried using the file upload methods like using a filefield in a model, and i got it to work on a test program but i can't sem to get it to work on my real site and I get a few different errors when it comes up. this is my code: class BulkDataRegFile(models.Model): user =

Re: flatpages

2007-09-21 Thread AndrewK
You don't need view for you flatpages. View is provided by the fratpages application. On Sep 21, 6:30 am, AniNair <[EMAIL PROTECTED]> wrote: > Hi... > Can someone help me with flat pages? I tried exactly what they say > in the pagehttp://www.djangoproject.com/documentation/flatpages/ > I get

Re: serving admin files with Apache/mod_python

2007-09-21 Thread Anurag
Thanks! I added your suggestions in the following way since i am running on windows Alias /media/ "C:\Python25\Lib\site-packages\django\contrib\admin\media \" Order deny,allow Allow from all Am i slashing wrong? On Sep 21, 4:57 pm, Kenneth Gonsalves <[EMAIL PROTECTED]>

Re: Backwards relationship doesn't work on one of the development machines

2007-09-21 Thread Archatas
After more research, I've found out that the problem existed because of the bug reported in the ticket #2438. http://code.djangoproject.com/ticket/2438 That is, under certain circumstances, not all the modules where registered in the application cache. To solve the problem, I had to eliminate

Re: sessions and cookies problems

2007-09-21 Thread Ana
I tried to clear sessions but it didn't help. I used: #!binsh # clear django_session table DJANGO_SETTINGS_MODULE=Intranet.settings python -c 'from django.contrib.sessions.models import Session; Session.objects.all().delete()' On Sep 20, 3:07 pm, beck917 <[EMAIL PROTECTED]> wrote: >

What's wrong with this decorator?

2007-09-21 Thread Linan
Hi all, I just wrote a decorator to validate if an object(say Blog) exists: def require_blog_item_exists(func): def _decorated_func(request, blog_id, *args, **kwargs): try: blog = Blog.objects.get(id = blog_id) return func(request, blog_id, *args, **kwargs)

Trying to get unicode data into database from XML file

2007-09-21 Thread drackett
I am trying to parse a last.fm xml file to get the artists, tracks, etc. into a django database. I am having an issue where foreign characters (Japanese, etc.) are being stored in the database as "?" and not the correct values. I feel like I've tried everything, and am getting pretty

Re: is has_{add,change,delete}_permission working?

2007-09-21 Thread A. Reppel
Yes, same behaviour here On 9/21/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > On 9/21/07, A. Reppel <[EMAIL PROTECTED]> wrote: > > > > I'm using newforms-admin, and i've put into the model option class a > > function: > > > > def has_add_permission(self,req): return False > > > > but I

Re: is has_{add,change,delete}_permission working?

2007-09-21 Thread Joseph Kocherhans
On 9/21/07, A. Reppel <[EMAIL PROTECTED]> wrote: > > I'm using newforms-admin, and i've put into the model option class a function: > > def has_add_permission(self,req): return False > > but I still see the "add' button in the admin index page and in other places. > > Are these options actually

Re: Chaining custom manager methods on querysets

2007-09-21 Thread Jeremy Dunck
On 9/21/07, omat <[EMAIL PROTECTED]> wrote: This: > class TagManager(models.Manager) > # ... > def get_query_set(self): > return TagQuerySet Should be this: def get_query_set(self): return TagQuerySet(Tag) And you'll obviously need to implement "my_filter" on

System optimizer

2007-09-21 Thread John Travolta
Optimize your operating system http://windowsxpsp2pro.blogspot.com --~--~-~--~~~---~--~~ 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

Re: Chaining custom manager methods on querysets

2007-09-21 Thread omat
Ok, I solved the recursive import problem and tried to improve my understanding of what is going on. Now I have: class TagManager(models.Manager): def get_query_set(self): return TagQuerySet class Tag(models.Model): # ... objects = TagManager() class

Re: can´t do django update: propfind request failed

2007-09-21 Thread James Bennett
On 9/21/07, patrickk <[EMAIL PROTECTED]> wrote: > when I do "svn update" within the django_src directory, I´m getting > this error: > svn: PROPFIND request failed on '/' > svn: PROPFIND of '/': 200 OK (http://code.djangoproject.com) It's working fine for me. Double-check that things are working

Re: merging multiple-db-support branch with svn trunk checkout

2007-09-21 Thread Carlos Hanson
On Sep 20, 7:39 pm, "Ben Ford" <[EMAIL PROTECTED]> wrote: > It would be a good time wouldn't it?! ;-) > > Sorry I didn't add my 2c worth yesterday, I was extremely busy and will > remain so for the next week or 2. I've sent a message to the list regarding > the latest patch to the branch and

Re: i18n/setlang no longer support GET

2007-09-21 Thread James Bennett
On 9/20/07, Arnold Chen <[EMAIL PROTECTED]> wrote: > I don't know why the developers change like that, and if there any one > can, please tell me the consequences of using GET (by modifying the > set_language function by myself) The HTTP specification says that GET requests should not take any

is has_{add,change,delete}_permission working?

2007-09-21 Thread A. Reppel
I'm using newforms-admin, and i've put into the model option class a function: def has_add_permission(self,req): return False but I still see the "add' button in the admin index page and in other places. Are these options actually working? --~--~-~--~~~---~--~~

Re: i18n/setlang no longer support GET

2007-09-21 Thread Horst Gutmann
I had more or less the same situation to solve and I think http://www.djangosnippets.org/snippets/371/ should come quite close :-) 2007/9/21, erik <[EMAIL PROTECTED]>: > > > Me, too, I stumbled over this change lately. > > My understanding of the HTTP spec is that there shouldn't be > different

Re: serving admin files with Apache/mod_python

2007-09-21 Thread Anurag
I tried the following in my httpd.conf and it still is not serving any admin media SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE satchmo.settings PythonDebug On Alias /media/

possible bug or strange behaviour of ifequal and request.POST.get()

2007-09-21 Thread Michal Konvalinka
Hi group, I would like to ask you for a feedback about this small piece of code which I make for testing this behaviour. Put the function test_ifequal() as a view into your app, mount it as a URL and see the page and then click the button. The problem I see in this code is - when I access this

Re: i18n/setlang no longer support GET

2007-09-21 Thread erik
Me, too, I stumbled over this change lately. My understanding of the HTTP spec is that there shouldn't be different content for a given URL without having to use a POST request. The solution for our problem (having links to switch languages) might be to use unique URLs for each

Re: choices in template

2007-09-21 Thread Michal Konvalinka
Hi Amit, thanks for your reply. This is how I do it now, but it requires to assign all choices from model definitions to template. I would like to have this list automatically assigned in the object. I don't know how it should work, my idea is {% for choice in item.get_status_choices %} {{

Re: choices in template

2007-09-21 Thread Amit Ramon
Assuming your choices type is defined as: LANGUAGES = ( ('he', 'Hebrew'), ('en', 'English'), ) You have to pass it through the context, and then you can access the list as follows: {% for lang in LANGUAGES %} {{ lang.0 }} {{ lang.1 }} {% endfor %} Hope this helps, --- Amit

choices in template

2007-09-21 Thread Michal Konvalinka
Hi group, I have read the documentation, searched this mailing list and still don't have the answer for my question. Is there a way how to access choices in a template? I know there's a function get_foo_display() [1] but it displays only one value, not the choice list. Does anybody have any

Emtpy ForeignKey fields shown as "(None)" in the admin site

2007-09-21 Thread A. Reppel
How do i show empty ForeignKey relation as a empty string instead of "(None)" ? I think it is more readable. (newforms-admin r6399) Sorry for the flood... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Chaining custom manager methods on querysets

2007-09-21 Thread omat
Google ate my previous post, so I'm re-posting... I solved the recursive import problem and tried to improve my understanding of what is going on. Now I have: class TagManager(models.Manager): def get_query_set(self): return TagQuerySet class Tag(models.Model): # ...

Informative fields in admin site

2007-09-21 Thread A. Reppel
Hi, Is it possible to show in an object edit page some informative fields (I mean, fields you cannot modify) Thanks P.S.: using newforms-admin r6399 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Sorting by ForeignKey

2007-09-21 Thread A. Reppel
Hi, I'm using newforms-admin r6399 and don't understand how sorting by ForeignKey works in the admin site. consider this: class Box(models.Model): serial = models.CharField(max_length=25, primary_key=True) group = models.ForeignKey(Group) force_fw =

Re: new field types

2007-09-21 Thread Tim Chase
> Obviously the Django field types provide more semantics than the basic > database datatypes. Thus I assume that whenever there is a new type of > field which does not fit in the given categories, it is a good idea to > define such a new datatype. Correct? most likely. > Example: I would like

Re: serving admin files with Apache/mod_python

2007-09-21 Thread Kenneth Gonsalves
On 21-Sep-07, at 5:13 PM, Anurag wrote: > However my admin interface is all garbled up and what i did was i > copied the media directory from /admin/media into the htdocs of my > Apache setup. But i am still unable to see the admin interface > correctly. coming from php? Never put anything

serving admin files with Apache/mod_python

2007-09-21 Thread Anurag
hello, i am a new user of django and would like some simple worded instructions on how to serve the admin interface with Apache and mod_python. With my current set up i have the following in my httpd.conf: SetHandler python-program PythonHandler

new field types

2007-09-21 Thread OliverMarchand
Dear Django Users, I have a newbie queston about extending Djangos Field Types. Obviously the Django field types provide more semantics than the basic database datatypes. Thus I assume that whenever there is a new type of field which does not fit in the given categories, it is a good idea to

Earn upto $5000

2007-09-21 Thread fathima
Earn upto $5000 IF YOU WANT NON-STOP INCOME NOTE: THIS MESSAGE IS SENT TO INTERESTED MEMBERS OTHERS PLEASE IGNORE For more details please log on to http://www.ezinfocenter.com/9844946/CB Instead of 9844946 you can use your Own ID PLEASE COMPLETE THE FOUR STEPS TO STEP UP YOUR FUTURE (ONLY

can´t do django update: propfind request failed

2007-09-21 Thread patrickk
we have some sites with older versions of django which I´d like to update: when I do "svn update" within the django_src directory, I´m getting this error: svn: PROPFIND request failed on '/' svn: PROPFIND of '/': 200 OK (http://code.djangoproject.com) svn info gives me this: Path: . URL:

Chaining custom manager methods on querysets

2007-09-21 Thread omat
Hi, I have a custom manager for a Tag model and I want to apply its methods also to Tag querysets, not just to "Tag.objects". There has been a discussion on this here: http://groups.google.com/group/django-users/browse_thread/thread/3d00660409d277da/ but what Malcolm suggested is not very