Re: How to launch home page from urls.py?

2010-10-13 Thread Chris Boyd
home/winapp/HomePage.html' } ), or ( r'^$', '/home/winapp/HomePage.html' ), Any ideas? Thanks, Chris 2010/10/13 Jonathan Barratt <jonathan.barr...@knifeict.com> > > On 13 ?.?. 2010, at 7:57, Chris wrote: > > > Hello, > > > > Currently in my urls.py I have &qu

Re: How to launch home page from urls.py?

2010-10-13 Thread Jonathan Barratt
On 13 ?.?. 2010, at 7:57, Chris wrote: > Hello, > > Currently in my urls.py I have "( r'^winapp/(?P.*)$', > 'django.views.static.serve', { 'document_root': 'winapp' } )," and I > can launch my home pahe by pointing my browser to something like > "a.b.com/winapp

How to launch home page from urls.py?

2010-10-13 Thread Chris
Hello, Currently in my urls.py I have "( r'^winapp/(?P.*)$', 'django.views.static.serve', { 'document_root': 'winapp' } )," and I can launch my home pahe by pointing my browser to something like "a.b.com/winapp/HomePage.html". I have gone through the documentation and a co

Re: admin site not working, problem with urls.py?

2010-10-09 Thread binaryjohn
Hi Lisa, The easiest way (I have found) to get the admin media in to your project is to create a symbolic link inside your static media folder to the admin/media subfolders. I believe there are three of them (css,img, js). I hope this link helps

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Lisa
Hi, It seems you're right CSS isn't being served correctly, so what is the easiest way to include the css files, I'm using apache2 w/ a conf file and modpython... Thanks, Lisa On Oct 6, 11:36 am, Sandro Dutra wrote: > Ah yeah, forget to comment this... > > If you're using the

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
Ah yeah, forget to comment this... If you're using the django dev server to test your application, you'll have to set where the static files are, you can do this with a builtin view: django.views.static.serve. 2010/10/6 Steve Holden > It's much more likely that your CSS

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Steve Holden
It's much more likely that your CSS style sheets are not being served correctly - you can check this by looking at the page's HTML source and then pasting the style sheet's URL into your browser's location bar. The Django 1.0 admin is a reasonably well-styled layout, so you certainly shouldn't be

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
Your Django version is really outdated. I think you can update using the Update Manager or calling the terminal and typing: sudo apt-get update This command will resync the packages with the current version on distro repository. Alternatively you can update via python setuptools, using the

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Lisa Gandy
Thanks for the help, This ended up working (r'^admin/(.*)', admin.site.root) Now, when I look at the admin panel, its really funky looking, it definitely works, but its like its missing a template. Do yout hink its b/c the version of django on teh server is old? Its 1.0.4 If thats the

Re: admin site not working, problem with urls.py?

2010-10-05 Thread Sandro Dutra
You have to check if you enable the "admin" application on your settings.py. 2010/10/5 Sithembewena Lloyd Dube > Hey Lisa, > > Look at this line (supplied by you): > > > # (r'^ccu/', include('ccu.foo.urls')), > > ^^ the line above is correct. > > Now, the line that's giving

Re: admin site not working, problem with urls.py?

2010-10-05 Thread Sithembewena Lloyd Dube
Hey Lisa, Look at this line (supplied by you): # (r'^ccu/', include('ccu.foo.urls')), ^^ the line above is correct. Now, the line that's giving you trouble is: (r'^admin/', include(admin.site.urls)), ^^ spot the difference? I think you should use quotes around your argument to the include

Re: admin site not working, problem with urls.py?

2010-10-05 Thread Tran Cao Thai
hope this helps : http://botland.oebfare.com/logger/django/2009/2/14/15/ The conversation is very funny also :D On Wed, Oct 6, 2010 at 9:01 AM, Lisa wrote: > Hi all, > I'm sure I have a pretty simple problem... > here's my url.py file > > from

admin site not working, problem with urls.py?

2010-10-05 Thread Lisa
Hi all, I'm sure I have a pretty simple problem... here's my url.py file from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^ccu/',

Re: urls.py best practices

2010-09-22 Thread Brian Bouterse
Have you looked at REST style URI's? With REST the action (aka verb) is never contained in the URL and is instead enumerated by the HTTP method type (ie: GET, PUT, POST, DELETE). This produces a much cleaner, more useful, more

urls.py best practices

2010-09-22 Thread jayfee
so i'm using django to do some "CRUD" type stuff, but i'm avoiding using the generic create_update methods because i've found my relationships and data types don't always fit neatly enough to work. anyway, the piece that i'm trying to tackle now is getting a clean routing system going. here's how

Passing view extra info from urls.py

2010-09-02 Thread r_f_d
passed. Here is the urls.py entry: (r'requirementlibrary/(?P\d+)/requirements/$', 'requirements', {'filter_param':'library'}), and the view: def requirements(request, id=None, filter_param=None): print filter_param the filter_param is always "None" Here is the example from the d

Auto-generating menus based on walking urls.py?

2010-08-27 Thread Tim Chase
Just playing around with some ideas, I've been trying to figure out how to auto-generate some menus based on my url.py config layout. 1) what's the preferred way to get the "base" (rather than include()'ed) urls.py I see a core.urlresolvers.get_urlconf but that seems an inte

Re: Error with passing 'form_class' arg in urls.py for Django Profiles app

2010-07-15 Thread Ricko
       name='profiles_profile_detail'), >                        ) > > On Jul 15, 2:40 am, Subhranath Chunder <subhran...@gmail.com> wrote: > > > Could you provide the code for the custom ProfileForm class and the views > > first. > > > Thanks, > > Subhranath

Re: Error with passing 'form_class' arg in urls.py for Django Profiles app

2010-07-15 Thread Ricko
s, > Subhranath Chunder. > > On Thu, Jul 15, 2010 at 2:49 AM, Ricko <rickentr...@gmail.com> wrote: > > Using ubernostroms Django Registration app coupled with his Profile > > app, both highly recommended, got the default app up and running no > > problems at all. > > I'm

Re: Error with passing 'form_class' arg in urls.py for Django Profiles app

2010-07-15 Thread Subhranath Chunder
mmended, got the default app up and running no > problems at all. > I'm unable to override any default behaviour the proper way, as I > can't seem to pass any extra parameters through the urls.py file. Here > is my urls: > > from django.conf.urls.defaults import * >

Error with passing 'form_class' arg in urls.py for Django Profiles app

2010-07-14 Thread Ricko
Using ubernostroms Django Registration app coupled with his Profile app, both highly recommended, got the default app up and running no problems at all. I'm unable to override any default behaviour the proper way, as I can't seem to pass any extra parameters through the urls.py file. Here is my

Re: Practical Django Projects 2: Weblog urls.py help...

2010-05-11 Thread mhulse
> I think the problem is due to the month digit... The book opted to use > the 3-letter month name vs the two digits... I personally like the > month as digits so I changed the urls.py and models.py to use %m. My coworker solved this problem for me: entry_info_dict = {

Practical Django Projects 2: Weblog urls.py help...

2010-05-09 Thread mhulse
Hi, I am working my way through Practical Django Projects, 2nd addition, and I am having troubles getting the weblog permalink url to function. >From my urls.py: === entry_info_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', } ... ... (r'^(?P\

Re: error in urls.py

2010-05-04 Thread andy saksena
Thanks that resolved. On May 3, 5:41 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On May 3, 8:27 am,andysaksena <andy.saks...@gmail.com> wrote: > > > > > Hi > > > my urls.py is > > > from django.conf.urls.defaults import * > > > # U

Re: error in urls.py

2010-05-03 Thread Daniel Roseman
On May 3, 8:27 am, andy saksena <andy.saks...@gmail.com> wrote: > Hi > > my urls.py is > > from django.conf.urls.defaults import * > > # Uncomment the next two lines to enable the admin: > from django.contrib import admin > admin.autodiscover() > > urlpat

error in urls.py

2010-05-03 Thread andy saksena
Hi my urls.py is from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns(”, # Example: # (r’^/’, include(‘.foo.urls’)), (r’^accounts/’, include

Re: link not in urls.py but showing folders content

2010-04-20 Thread Alan
Thanks Tom, it's exactly what I was looking for. Cheers, Alan On Apr 20, 9:54 am, Tom Evans wrote: > On Tue, Apr 20, 2010 at 8:57 AM, Alan wrote: > > I will try a partial answer to myself. > > > I notice in httpd.conf that alias has the same

Re: link not in urls.py but showing folders content

2010-04-20 Thread Tom Evans
On Tue, Apr 20, 2010 at 8:57 AM, Alan wrote: > I will try a partial answer to myself. > > I notice in httpd.conf that alias has the same name for the folder re > outputs. So if I go to http://localhost/target/ (re uploads), this will > show the files in the folder uploads.

Re: link not in urls.py but showing folders content

2010-04-20 Thread Alan
; >IndexOptions FancyIndexing > > > > >Alias /outputs/ "/##/outputs/" > > > >Order allow,deny > >Options Indexes > >Allow from all > >IndexOptions FancyIndexing > > > > I have no reference

Re: link not in urls.py but showing folders content

2010-04-20 Thread Alan
yIndexing > >     > >    Alias /outputs/ "/##/outputs/" > >     > >        Order allow,deny > >        Options Indexes > >        Allow from all > >        IndexOptions FancyIndexing > >     > > I have no references to 'uploa

link not in urls.py but showing folders content

2010-04-20 Thread Alan
quot; Order allow,deny Options Indexes Allow from all IndexOptions FancyIndexing I have no references to 'uploads' or 'outputs' in my urls.py files. So when I type "http://localhost/uploads/;, I got: Page not found (404) Request Method: GET Request URL: http

Re: Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread gvernold
Thanks creecode, didn't realise that source was there. I checked out how the URL was passed to the view function and it works perfectly! So simple it's unbelievable. I assume this is the best method to use when starting your own CMS? On Mar 20, 11:35 am, creecode wrote: >

Re: Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread creecode
Take a look at how Flatpages < http://code.djangoproject.com/browser/django/trunk/django/contrib/flatpages > does it and see if something like that method will work for you. One trick with a pattern like this is to put it near the end of your patterns so that it doesn't get satisfied to early

Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread gvernold
as an argument. I remember seeing a similar post to this over a year ago but I can't find it in the user group archives. Somebody did actually provide a single line of code for urls.py that did something like this and explained it is simlar to the way flatpages works. Any help much appreciated, thanks

Re: Django not reading the URLConf (urls.py)

2010-02-28 Thread Rodrigo
I checked the ROOT_URLCONF and it was fine, and deleted all the *.pyc, without good results, but finally I found the problem. There was a copy of the same project in some other folder under the PYTHONPATH, so there was some kind of collision. Thanks everybody for helping me out. On Feb 28, 1:57 

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread Karen Tracey
On Sat, Feb 27, 2010 at 9:23 PM, piz...@gmail.com wrote: > Yes Karen, that's what I thought from the beginning, something is broken in > my Python installation, I'll explain it better. I'm currently using django > dev server and it doesn't update the .pyc files, let's say I

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread Prabhu
Did you check ROOT_URLCONF in settings.py? On Feb 27, 8:34 pm, Rodrigo <kewl...@gmail.com> wrote: > If I update any line on the urls.py, this doesn't reflect on the > server. I can even DELETE the file, and all the urls are still > working. I've tried restarting runserver m

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread piz...@gmail.com
El 28/02/2010, a las 1:03, Karen Tracey wrote: If you are routinely needing to delete .pyc files after making code changes in the corresponding .py files, something is broken. The post I responded to stated: "Python generates a compiled version of the file, and if you don't delete it, it

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread Kenneth Loafman
Karen Tracey wrote: > On Sat, Feb 27, 2010 at 6:31 PM, Kenneth Loafman > > wrote: > > Karen Tracey wrote: > > On Sat, Feb 27, 2010 at 4:05 PM, piz...@gmail.com > > >

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread Karen Tracey
On Sat, Feb 27, 2010 at 6:31 PM, Kenneth Loafman wrote: > Karen Tracey wrote: > > On Sat, Feb 27, 2010 at 4:05 PM, piz...@gmail.com > > > > > wrote: > > > > Did you delete the .pyc files? Python

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread Kenneth Loafman
Karen Tracey wrote: > On Sat, Feb 27, 2010 at 4:05 PM, piz...@gmail.com > > > wrote: > > Did you delete the .pyc files? Python generates a compiled version > of the file, and if you don't delete it, it never get's

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread Karen Tracey
On Sat, Feb 27, 2010 at 4:05 PM, piz...@gmail.com wrote: > Did you delete the .pyc files? Python generates a compiled version of the > file, and if you don't delete it, it never get's updated. At least it's the > problem I have. So if you update views.py and don't delete the

Re: Django not reading the URLConf (urls.py)

2010-02-27 Thread piz...@gmail.com
:34, Rodrigo escribió: If I update any line on the urls.py, this doesn't reflect on the server. I can even DELETE the file, and all the urls are still working. I've tried restarting runserver many times, even restarting the computer, and nothing happens. The last test I did was deleting

Django not reading the URLConf (urls.py)

2010-02-27 Thread Rodrigo
If I update any line on the urls.py, this doesn't reflect on the server. I can even DELETE the file, and all the urls are still working. I've tried restarting runserver many times, even restarting the computer, and nothing happens. The last test I did was deleting settings.py, to see

Re: Newbie help with namespaces in urls.py

2009-12-23 Thread Martyn
gt; a bit. > > > I've installed django and have followed through a few of the simpler > > tutorials and have decided it's time to brave the world by > > myself...and have fallen at the first hurdle. > > > I have a website with a urls.py and a views.py file in my django r

Re: Newbie help with namespaces in urls.py

2009-12-23 Thread Bill Freeman
lf...and have fallen at the first hurdle. > > I have a website with a urls.py and a views.py file in my django root, > these work fine and I've added some stuff to both files and they work > great: > > from django.conf.urls.defaults import * > from zombie_django.views import hel

Newbie help with namespaces in urls.py

2009-12-23 Thread Martyn
Hey, I'm new to django, so please excuse me for asking simple questions for a bit. I've installed django and have followed through a few of the simpler tutorials and have decided it's time to brave the world by myself...and have fallen at the first hurdle. I have a website with a urls.py

working djangobook ch.7 cant get urls.py running books and contact at same time

2009-11-28 Thread John Blake Arnold
folder in mysite/contact/views as suggested, once I did that I thought the conflict in my urls.py folder was due to views identifier conflicting as they had the same name for the views file but not the completely specific pathway urlpatterns = patterns('', (r'^hello/$', hello), (r'^time

Re: urls.py generic views and foreign keys

2009-11-04 Thread David
Thank you Daniel, that worked perfectly. --~--~-~--~~~---~--~~ 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

Re: urls.py generic views and foreign keys

2009-11-04 Thread Daniel Roseman
now how to pass > the blog.slug to it. So far I am just getting: > > object_list() got an unexpected keyword argument 'slug' > > My urls.py looks like this: > > from django.conf.urls.defaults import * > from bandsite.blogs.models import Blog > from bandsit

urls.py generic views and foreign keys

2009-11-04 Thread David
pass "blog.slug" into the Entry.objects.all() so it will pick up all the correct entries for referenced blog. I think I should be using select_related, but I don't know how to pass the blog.slug to it. So far I am just getting: object_list() got an unexpected keyword argument 'slug'

Re: Exiting view to continue urls.py

2009-09-29 Thread sunn
age that was previously not written in Django or when switching > > domains). > > > The app would just collect all URLs not found so I put it at the end > > of urls.py > > > (r'(?P.*)', 'project.app.views.redirect') > > > Problem is that

Re: Exiting view to continue urls.py

2009-09-29 Thread Daniel Roseman
ound so I put it at the end > of urls.py > > (r'(?P.*)', 'project.app.views.redirect') > > Problem is that I usually have another regex at the end that looks > like this > > (r'', include( 'customproject.app.views.page')) and this view will > throw a Http404 if no obje

Exiting view to continue urls.py

2009-09-29 Thread sunn
Dear Django users, I am trying to create a simple redirect app (useful when rewriting a page that was previously not written in Django or when switching domains). The app would just collect all URLs not found so I put it at the end of urls.py (r'(?P.*)', 'project.app.views.redirect') Problem

Re: Urls.py: Match a leading Question Mark

2009-09-25 Thread mike
Dziękują! (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, send email to

Re: Urls.py: Match a leading Question Mark

2009-09-25 Thread Jarek Zgoda
> are 1000s of these links, mod_rewrite might not be the best solution, > especially since we've got HttpResponsePermanentRedirect > > Old Link: > www.somesite.com/app/?product=1234 > > New Link: > www.somesite.com/app/slugged-text > > Urls.py Line: > (r'^app/\?

Urls.py: Match a leading Question Mark

2009-09-25 Thread mike
we've got HttpResponsePermanentRedirect Old Link: www.somesite.com/app/?product=1234 New Link: www.somesite.com/app/slugged-text Urls.py Line: (r'^app/\?product=(?P)$','site.app.views.xxx'), Now the problem is, Django wont match an escaped starting question mark (?) or am I missing something

Re: urls.py to directly call method on instance of FooModel

2009-09-17 Thread Gonzalo Delgado
El Thu, 17 Sep 2009 10:00:22 -0700 (PDT) IanSR escribió: > I realize this isn't in typical Django style, but I'd be interested > any feedback. The rough idea is outlined below. It doesn't sound like a good idea since you may end up breaking DRY (by writing the

urls.py to directly call method on instance of FooModel

2009-09-17 Thread IanSR
I would like tighten the link from URLs to instances of Models and have something like: import foo.FooModel urlpatterns = patterns('', (r'foo/create/?$', 'foo.FooModel.create'), (r'foo/(?P\d+)/?$', 'foo.FooModel.view'), (r'foo/(?P\d+)/edit$',

Re: urls.py

2009-09-14 Thread Ramanathan
I changed it to (r'^activate/(.+)/$','proj.register.views.activate') like Mark said and things worked out. I had been for hours looking at it. Finally got it .Thank you all. Regards, Ramanathan M --~--~-~--~~~---~--~~ You received this message because you are

Re: urls.py

2009-09-14 Thread Mark (Nosrednakram)
On Sep 14, 8:52 am, Ramanathan wrote: > I tried it.. but still it is not working. > > I am using django version 1.1. If your view takes a parameter you need to give it a name and I generally prepend a distinct identifier to my url so that django knows what's going on.

Re: urls.py

2009-09-14 Thread Ramanathan
I tried it.. but still it is not working. I am using django version 1.1. --~--~-~--~~~---~--~~ 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: urls.py

2009-09-13 Thread Peter Bengtsson
/ > (r'^(?P.*)$', 'django.views.static.serve', >  {'document_root': '/home/ramanathan/media/'}) > > These are the two lines in my urls.py file.. > > If i givehttp://localhost:8000/90/   it is matched > ashttp://localhost:8000/media/90/ insetad of getting redirected to >

urls.py

2009-09-13 Thread ramanathan
(r'^/(.+)/$','proj.register.views.activate') (r'^(?P.*)$', 'django.views.static.serve', {'document_root': '/home/ramanathan/media/'}) These are the two lines in my urls.py file.. If i give http://localhost:8000/90/it is matched as http://localhost:8000/media/90/ insetad of getting

Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-06 Thread Jim Myers
My noob error: I had extra "portal/" on my regex. Sorry and thanks for your attention. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-06 Thread Graham Dumpleton
n Tracey <kmtra...@gmail.com> wrote: > > > > > > On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers <myer...@gmail.com> wrote: > > > > > Hi, I'm using this regex in urls.py: > > > > > r'^portal/student/(?P\S+)/profile_edit$' > > > > >

Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Jim Myers
Hi, I'm using this regex in urls.py: > > > r'^portal/student/(?P\S+)/profile_edit$' > > > There's no trailing slash on this regex, but there is an end of string > > marker ($). So a match will have to end with 'profile_edit', no trailing > slash. > > > to try to

Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Karen Tracey
On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers <myer...@gmail.com> wrote: > > Hi, I'm using this regex in urls.py: > > r'^portal/student/(?P\S+)/profile_edit$' > > There's no trailing slash on this regex, but there is an end of string marker ($). So a match will have t

regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Jim Myers
Hi, I'm using this regex in urls.py: r'^portal/student/(?P\S+)/profile_edit$' to try to match this url: http://dd..org/portal/student/xx.yy/profile_edit/ It's supposed to put "xx.yy" into userid parameter and match and use the associated view. But it doesn't match. I've bang

Re: django newbie, having problems with my first app. maybe in the urls.py?

2009-08-11 Thread ezulo...@gmail.com
webapp. I cannot seem to get my helloworld > > > URL athttp://ezuloaga.webfactional.com/myproject/hello/todisplay > > > anything other than the default django page. here are my views.py and > > > urls.py files. according to the documentation, it should display my > >

Re: django newbie, having problems with my first app. maybe in the urls.py?

2009-08-10 Thread gumbah
nd > > running django 1.0 for my webapp. I cannot seem to get my helloworld > > URL athttp://ezuloaga.webfactional.com/myproject/hello/todisplay > > anything other than the default django page. here are my views.py and > > urls.py files. according to the documentation, it should display my >

Re: django newbie, having problems with my first app. maybe in the urls.py?

2009-08-10 Thread gumbah
URL athttp://ezuloaga.webfactional.com/myproject/hello/to display > anything other than the default django page. here are my views.py and > urls.py files. according to the documentation, it should display my > hello world page. Thanks for any help! > > [ezulo...@web93 myproject]$ cat

Re: django newbie, having problems with my first app. maybe in the urls.py?

2009-08-10 Thread Sujan Shakya
I m not sure if webfaction automatically deploy your django application, but I guess to need to configure server settings. For instructions on deploying http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index --~--~-~--~~~---~--~~ You

django newbie, having problems with my first app. maybe in the urls.py?

2009-08-09 Thread ezulo...@gmail.com
cannot seem to get my helloworld URL at http://ezuloaga.webfactional.com/myproject/hello/ to display anything other than the default django page. here are my views.py and urls.py files. according to the documentation, it should display my hello world page. Thanks for any help! [ezulo...@web93

Re: urls.py import() usage?

2009-07-23 Thread Joshua Russo
On Thu, Jul 23, 2009 at 3:09 PM, Matthias Kestenholz < matthias.kestenh...@gmail.com> wrote: > > Well, there is a big difference between the two. include() takes the > python path to an URLconf file while the other form takes a view. > > You should read the documentation on this page if you

Re: urls.py import() usage?

2009-07-23 Thread Joshua Russo
there should have been a comma after the word not. On Thu, Jul 23, 2009 at 2:40 PM, Saketh wrote: > Joshua, could you clarify what you mean by "not in the url pattern list?" > > Sincerely, > Saketh > > -- > Saketh Bhamidipati > Harvard College '11 >

Re: urls.py import() usage?

2009-07-23 Thread Matthias Kestenholz
On Thu, Jul 23, 2009 at 5:33 PM, Joshua Russo wrote: > On Thu, Jul 23, 2009 at 2:18 PM, Matthias Kestenholz > wrote: >> >> On Thu, Jul 23, 2009 at 4:51 PM, Joshua Russo >> wrote: >> > >> > Is there any difference

Re: urls.py import() usage?

2009-07-23 Thread Saketh
Joshua, could you clarify what you mean by "not in the url pattern list?" Sincerely, Saketh -- Saketh Bhamidipati Harvard College '11 http://people.fas.harvard.edu/~svbhamid/ On Thu, Jul 23, 2009 at 11:33 AM, Joshua Russo wrote: > On Thu, Jul 23, 2009 at 2:18 PM,

Re: urls.py import() usage?

2009-07-23 Thread Joshua Russo
On Thu, Jul 23, 2009 at 2:18 PM, Matthias Kestenholz < matthias.kestenh...@gmail.com> wrote: > > On Thu, Jul 23, 2009 at 4:51 PM, Joshua Russo > wrote: > > > > Is there any difference between using import() versus not in the url > > pattern list? > >

Re: urls.py import() usage?

2009-07-23 Thread Matthias Kestenholz
On Thu, Jul 23, 2009 at 4:51 PM, Joshua Russo wrote: > > Is there any difference between using import() versus not in the url > pattern list? >    (r'^accounts/login/$', 'django.contrib.auth.views.login'), >    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

urls.py import() usage?

2009-07-23 Thread Joshua Russo
Is there any difference between using import() versus not in the url pattern list? (r'^accounts/login/$', 'django.contrib.auth.views.login'), (r'^admin/doc/', include('django.contrib.admindocs.urls')), --~--~-~--~~~---~--~~ You received this message because

Re: urls.py error: unbalanced parenthesis

2009-07-19 Thread Gabriel Gunderson
On Sun, Jul 19, 2009 at 4:02 AM, Rob B (uk) wrote: >         (r'^(?P\d{4}/, 'archive_year', entry_info_dict, This named regular-expression group is missing a ")" It should be: (?P\d{4}) http://docs.djangoproject.com/en/dev/topics/http/urls/#named-groups Best, Gabe

Re: urls.py error: unbalanced parenthesis

2009-07-19 Thread Frédéric Hébert
2009/7/19 Rob B (uk) <robtot...@googlemail.com>: > > Getting a unblanced parenthesis error with this urls setup. Not sure > why. The message is pretty self-explanatory. It seems to me that you have forgotten a parenthesis after your first symbolic group named year. Frédéric &g

urls.py error: unbalanced parenthesis

2009-07-19 Thread Rob B (uk)
Getting a unblanced parenthesis error with this urls setup. Not sure why. urls.py: from django.conf.urls.defaults import * from coltrane.models import Entry entry_info_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', } urlpatterns = patterns

Re: Cannot reverse inside urls.py

2009-04-05 Thread robin
, removing is complete, etc. and they all look pretty much the same except with different title and different amount/types of links. This way there's no need for a new view and a new template. Just changing a couple of lines in urls.py But I do realise that reverse(edit_item) and reverse(view_item

Re: Cannot reverse inside urls.py

2009-04-03 Thread Alex Gaynor
On Fri, Apr 3, 2009 at 9:32 PM, Malcolm Tredinnick wrote: > > On Fri, 2009-04-03 at 21:07 -0400, Alex Gaynor wrote: > [...] > > A lazy reverse shouldn't be too difficult to implement in your own > > code though: > > > > from django.utils.functional import lazy > >

Re: Cannot reverse inside urls.py

2009-04-03 Thread Malcolm Tredinnick
On Fri, 2009-04-03 at 21:07 -0400, Alex Gaynor wrote: [...] > A lazy reverse shouldn't be too difficult to implement in your own > code though: > > from django.utils.functional import lazy > reverse_lazy = lazy(reverse, str) This would have to be "unicode", not "str", since reverse() really

Re: Cannot reverse inside urls.py

2009-04-03 Thread Malcolm Tredinnick
On Fri, 2009-04-03 at 01:24 -0700, robin wrote: > It seems like you cannot use reverse within urls.py > > url(r'^add/$','items.views.add_item_wizard',name='add_item_wizard'), > > url(r'^add/complete/ > $','django.views.generic.simple.direct_to_template',{ > 'te

Re: Cannot reverse inside urls.py

2009-04-03 Thread Reiner
as the_url %} I'm linking to {{ the_url }} This way you don't need to pass the URL in your extra_context. Regards, Reiner On Apr 3, 10:24 am, robin <robinc...@gmail.com> wrote: > It seems like you cannot use reverse within urls.py > >   url(r'^add/$','items.views.add_item_wizard',name='

Re: Cannot reverse inside urls.py

2009-04-03 Thread robin
By the way it will give the following error, if I do reverse in urls.py: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/core/servers/ basehttp.py", line 278, in run self.result = application(self.environ, self.start_response) File "/us

Cannot reverse inside urls.py

2009-04-03 Thread robin
It seems like you cannot use reverse within urls.py url(r'^add/$','items.views.add_item_wizard',name='add_item_wizard'), url(r'^add/complete/ $','django.views.generic.simple.direct_to_template',{ 'template':'message.html', 'extra_context':{ 'title': 'Add Item Complete

Re: Hooking up Django signal to urls.py

2009-03-23 Thread Addy Yeow
Apache would have solved the problem for simple request but there are other data that I wanted to store when the request is made, e.g. attribute data, etc. On Mon, Mar 23, 2009 at 6:44 PM, Russell Keith-Magee wrote: > > On Mon, Mar 23, 2009 at 7:17 PM, Addy Yeow

Re: Hooking up Django signal to urls.py

2009-03-23 Thread Russell Keith-Magee
On Mon, Mar 23, 2009 at 7:17 PM, Addy Yeow wrote: > Hi guys, > > I like to track my visitors URL request in my application. ... > Any idea? Or I should not use signal for this purpose? You could probably get something like this to work, but I have to ask - Is there any reason

Hooking up Django signal to urls.py

2009-03-23 Thread Addy Yeow
Hi guys, I like to track my visitors URL request in my application. To achieve this, I am trying to trigger my signal's receiver function called log_start when a browser request matches a URL pattern in my_app/urls.py. === my_proj/my_app/models.py === from django.core.signals import * from

Re: Filter ALL requests before dispatching via URLs.py?

2009-03-10 Thread Malcolm Tredinnick
On Tue, 2009-03-10 at 20:18 -0700, Joshua K wrote: > Hello, > > Is there a way to filter all requests before URLS.py dispatches the > request? > > I am developing a Pinax application. I have some custom menu tabs > across the top, and I limit the visibility of those tabs

Re: Filter ALL requests before dispatching via URLs.py?

2009-03-10 Thread Chris Czub
ua K <jobe...@gmail.com> wrote: > > Hello, > > Is there a way to filter all requests before URLS.py dispatches the > request? > > I am developing a Pinax application.  I have some custom menu tabs > across the top, and I limit the visibility of those tabs depending on &

Re: Filter ALL requests before dispatching via URLs.py?

2009-03-10 Thread Alex Gaynor
On Tue, Mar 10, 2009 at 10:18 PM, Joshua K <jobe...@gmail.com> wrote: > > Hello, > > Is there a way to filter all requests before URLS.py dispatches the > request? > > I am developing a Pinax application. I have some custom menu tabs > across the top, and I limi

Filter ALL requests before dispatching via URLs.py?

2009-03-10 Thread Joshua K
Hello, Is there a way to filter all requests before URLS.py dispatches the request? I am developing a Pinax application. I have some custom menu tabs across the top, and I limit the visibility of those tabs depending on flags present in the user's account. I do this by enabling custom fields

Re: Django will not match r^sip/conf string in urls.py on Apache2 / modpython

2009-03-04 Thread Dan
Looks like I had a sip directory under my templates so was confusing Apache I guess. Anyway, fixed now so thanks. Renamed it as noted above. On Mar 4, 9:10 am, Rajesh Dhawan wrote: > Rajesh D wrote: > > On Mar 4, 9:58 am, Dan wrote: > > > Url pattern

Re: Django will not match r^sip/conf string in urls.py on Apache2 / modpython

2009-03-04 Thread Rajesh Dhawan
Rajesh D wrote: > On Mar 4, 9:58 am, Dan wrote: > > Url pattern below r^sip/conf and sip/createfile work for development > > server but Apache comes up with a 404 error. Note that the error is > > shown as Apache error not Django parsing error. So, is it Apache not > > using

<    1   2   3   4   5   >