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 > mailto:kenneth.loaf...@gmail.com>> 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 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 nev

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 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 many times, even restar

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 just change a > line i

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 am

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_

Re: matching a domain name in urls.py

2011-02-03 Thread mike171562
I think i got it now with (r'^zones/(?P[.\w]+)/$', get_domain) On Feb 3, 10:44 am, mike171562 wrote: > I am building an app that passes a domain name to urls.py like so   "/ > sites/domain.com/' > > but I cannot get my urls.py to match the 'domain.com

Re: matching a domain name in urls.py

2011-02-03 Thread Jirka Vejrazka
> I am building an app that passes a domain name to urls.py like so   "/ > sites/domain.com/' > > but I cannot get my urls.py to match the 'domain.com'  it only seems > to match if i just use domain without the dot > > I have tried > >    (r

Re: matching a domain name in urls.py

2011-02-03 Thread Tom Evans
On Thu, Feb 3, 2011 at 4:50 PM, mike171562 wrote: > I think i got it now with > > (r'^zones/(?P[.\w]+)/$', get_domain) > > . matches any character, not just dot. Your class '[.\w]+' will actually match anything and everything. I think you want '[\.\w]'. Cheers Tom -- You received this message

Re: matching a domain name in urls.py

2011-02-03 Thread Cal Leeming [Simplicity Media Ltd]
Hi Mike, May I suggest RegexBuddy for anything regex related in the future, it have saved me a *lot* of time! Cal On Thu, Feb 3, 2011 at 4:44 PM, mike171562 wrote: > I am building an app that passes a domain name to urls.py like so "/ > sites/domain.com/' > > but I ca

Re: matching a domain name in urls.py

2011-02-03 Thread Cal Leeming [Simplicity Media Ltd]
* of time! > > Cal > > > On Thu, Feb 3, 2011 at 4:44 PM, mike171562 wrote: > >> I am building an app that passes a domain name to urls.py like so "/ >> sites/domain.com/' >> >> but I cannot get my urls.py to match the 'domain.com' i

Re: matching a domain name in urls.py

2011-02-03 Thread Łukasz Rekucki
> On Thu, Feb 3, 2011 at 4:50 PM, mike171562 wrote: >> I think i got it now with >> >> (r'^zones/(?P[.\w]+)/$', get_domain) Depending on what you plan to do with the matched string later, you may want to limit it to 256 characters or incorporate some more checks, like: r"^zones/(?P(?:[A-Za-z-]{1

Re: matching a domain name in urls.py

2011-02-03 Thread Tom Evans
2011/2/3 Łukasz Rekucki : > On 3 February 2011 17:52, Tom Evans wrote: >> >> . matches any character, not just dot. Your class '[.\w]+' will >> actually match anything and everything. I think you want '[\.\w]'. >> > > Not if used in a character class: > re.match("[.]", ".") > <_sre.SRE_Match

Re: admin interface and urls.py regex issue

2011-04-03 Thread Karen Tracey
On Sun, Apr 3, 2011 at 11:35 PM, xiao_haozi wrote: > I'm running into some perplexing regex issues in urls.py and getting > to my admin section. > It worked before but now that I have another view added in, anything > beyond the index regex is getting fed into the "url/&

Re: admin interface and urls.py regex issue

2011-04-03 Thread xiao_haozi
On Apr 3, 11:58 pm, Karen Tracey wrote: > On Sun, Apr 3, 2011 at 11:35 PM, xiao_haozi wrote: > > I'm running into some perplexing regex issues in urls.py and getting > > to my admin section. > > It worked before but now that I have another view added in, anything >

Re: cannot locate syntax error in urls.py

2012-04-23 Thread Daniel Roseman
ype: SyntaxError at /comunali/ > Exception Value: invalid syntax (urls.py, line 23) > > > which I confirmed by trying to import urls py fin the shell. > I'm quite puzzled by the fact that line 23 in my file is not a line of > code, since urls.py has only 22 lines. I looked throug

Re: cannot locate syntax error in urls.py

2012-04-23 Thread r0pewalker
ormed a reduced set of correct views and templates for the > > purpose of testing but i cannot step through this: > > > > > > Exception Type: SyntaxError at /comunali/ > > Exception Value: invalid syntax (urls.py, line 23) > > > which I confirmed by trying to impo

Re: Different urls.py file for different apps

2012-05-22 Thread Alexandr Aibulatov
you could include urls of app into your_app/urls.py urlpatterns = patterns('', (r'your_app/', include('your_apps.urls')) (r'your_app2/', include('your_apps2.urls'))

Re: Different urls.py file for different apps

2012-05-22 Thread Andy McKay
Use include to pull in values from other apps inside your urls.py https://docs.djangoproject.com/en/dev/topics/http/urls/#including-other-urlconfs On Tue, May 22, 2012 at 11:49 AM, siddharth56660 wrote: > Hi, > I am developing an ERP system which is vast and covers many modules. &

how to match a url in urls.py

2011-10-03 Thread He Jibo
Hello, I want to match a url in urls.py. Can you teach me how to do it? Thanks.I have tried the following two versions. But as long as I put a . (dot) in the regular expression, it gives me a "bad character range" error. (r'^pagerank/(?P*([/w-]+/.)+[/w-]+.([^a-z])(/[/w-: ./?

{% url 'admin:jsi18n' as jsi18nurl %} error as urls.py

2012-01-06 Thread MikeKJ
Exception Type: TemplateSyntaxError Exception Value: Caught SyntaxError while rendering: invalid syntax (urls.py, line 7) Exception Location: /home/paston2/webapps/nortons/lib/python2.7/ django/utils/importlib.py in import_module, line 35 Python Executable: /usr/local/bin/python

Re: Retrieve current user id in urls.py

2012-11-27 Thread Daniel Roseman
currently logged in user in my > urls.py, like this: > > # urls.py >> from django.contrib.auth.decorators import login_required >> from django.views.generic import list_detail >> from myproj.myapp.models import App1 >> > >> app1_info = { >>

Re: Retrieve current user id in urls.py

2012-11-28 Thread Peter Edström
Thank you. It's quite logical when you know it. :-) > This isn't something you do in the urlconf. You do that in your view, > where the current user is available already as `request.user`. > -- > DR. > -- You received this message because you are subscribed to the Google Groups "Django users

Re: Django urls.py reload (not from database)

2016-06-23 Thread Luis Zárate
I put all in urls and check permissions with https://docs.djangoproject.com/en/1.9/topics/auth/default/#django.contrib.auth.decorators.user_passes_test so if not config.L7V_INITIALIZATED I raise a 404 exception. No need to reload urls. 2016-06-23 8:02 GMT-06:00 Thomas : > Hy django lovers,

Ho can I reverse urls inside urls.py?

2013-10-08 Thread DJ-Tom
uction server. This is the relevant part of my urls.py, I marked the prolematic parts in red: url(r'^password/reset/$','django.contrib.auth.views.password_reset',{'post_reset_redirect' : '/accounts/password/reset/done/', 'template_name'

Re: Empty urls.py file and {% url %} tags

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 10:06 +, Ryan Kanno wrote: > I know this isn't big (and maybe it's by design), but this didn't > happen prior to I believe -r 5516. If you have a empty urls.py > include file in any app within the project, it causes the {% url %} > tag to no

Re: Empty urls.py file and {% url %} tags

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 21:43 +1000, Malcolm Tredinnick wrote: > On Mon, 2007-06-25 at 10:06 +, Ryan Kanno wrote: > > I know this isn't big (and maybe it's by design), but this didn't > > happen prior to I believe -r 5516. If you have a empty urls.py > >

Re: Using decoupled urls.py and generic views

2007-09-14 Thread Nathaniel Whiteinge
If you're only doing one or two, use callables [1]_ which will ignore your view prefix:: from django.conf.urls.defaults import * from models import Abbreviation import django.views.generic.list_detail.object_list as object_list info_dict = { "queryset": Abbreviation.objects.all()

Re: Using decoupled urls.py and generic views

2007-09-14 Thread Nathaniel Whiteinge
Whoops, mind the typo. Should be:: urlpatterns = patterns("xgm.AbbrDB.views", (r"^$", "search"), ) urlpatterns += patterns("django.views.generic.list_detail", (r'^list/$', 'object_list', info_dict), ) --~--~-~--~~~---~--~~ You rece

Generating web-service API docs from urls.py

2007-11-27 Thread raminf
o the consumers of your web-service API. It seems like scanning urls.py and tracking down the chain of 'include' settings is what would be needed. I'm guessing there isn't anything out there, but I figured I'd ask first in case someone had alread

Re: Problems configuring urls.py to respond to /

2005-10-26 Thread Andreas Stuhlmüller
Hi Clint, > How would I set up my urls.py to redirect people who attempt to access the > root URL of the site, (ie. http://mydomain.com/) to the application I want > people to use (ie. http://mydomain.com/myapp/) The regex that catches the root URL is ^/?$ (r'^/?$' in ur

Polls tutorial suggested mysite/mysite/urls.py improvement

2017-08-26 Thread Mike Dewhirst
://docs.djangoproject.com/en/1.11/intro/tutorial01/ In the "Write your first view" section it says ... The next step is to point the root URLconf at the |polls.urls| module. In |mysite/urls.py|, add an import for |django.conf.urls.include| and insert an |include()| <https://docs.djangoprojec

Django 1.4 urls.py deprecated, urlpatterns to change

2019-11-08 Thread Mdlr
I try to compile an old code in Django 1.4 Many things are deprecated. I manage to change some of them but I don't knwo how to go futher on the urls.py here is the old code *from django.conf.urls.defaults import * from django.conf import settings dynurls = patterns('minesw

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 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 t

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

2009-03-10 Thread Chris Czub
t 11:18 PM, 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 depending on > fla

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

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 does

urls.py and adding an OR to the regexp

2008-05-28 Thread Thierry
Hello django users, I'm new to django, and I was looking to implement a very simple url scheme that I used for a PHP site. It's simply an OR done into the matching. Taking the simpliest, I would like to implement this regexp: ^pric(e|es)/ into urls.py, but the () are overlapping wit

Re: django.views.generic.simple.direct_to_template doesn't support text/xml in urls.py?

2008-09-01 Thread ristretto.rb
I'm using 1.0 alpha, and had the same problem. Adding 'mimetype':'text/xml' as noted worked perfectly. thanks for the post!! On Aug 9, 8:25 pm, Valery <[EMAIL PROTECTED]> wrote: > Hi Julien, > > thank you for the answer. > > I've just tested your code, the effect is the same. Namely, > opensear

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 django.conf.urls.defaults import * > > # Uncomme

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 f

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 you trouble is: > >

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 pro

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 comm

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
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 style sheets are not bei

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 django dev server t

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 http://docs.djangoproject.com/en/dev/howto/deploymen

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

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

2010-10-13 Thread Chris Boyd
app' } ), or ( r'^$', LandingPage ), or ( r'^$', 'redirect_to', { 'url' : '/home/winapp/HomePage.html' } ), or ( r'^$', '/home/winapp/HomePage.html' ), Any ideas? Thanks, Chris 2010/10/13 Jonathan Barratt > &g

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

2010-10-13 Thread Robbington
Hi Chris, I use urlpatterns = patterns('django.views.generic.simple', (r'^$', 'direct_to_template',{'template': 'index.html'}), ) Where template is the defined template directory in my settings.py Seems a better way to me, as then if you want to expand your site you can just incorperate

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

2010-10-13 Thread Chris Boyd
Thank you Rob! > {'template': 'index.html'} But in that case I have to use Django template file, while my home page is built with Pyjamas (http://pyjs.org/). Can I use a Django urlpattern to launch any HTML file, not just Django tempalte file? Thank you, Chris On Wed, Oct 13, 2010 at 9:46 AM,

link not in urls.py but showing folders content

2010-04-20 Thread Alan
utputs/ "/##/outputs/" 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:

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 = {

a little help with the urls.py and views.py

2011-07-22 Thread Derick Felsman
specified authors, what would be the best way to go about doing that. urls.py and views.py code examples would be appreciated. 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@google

Re: how to match a url in urls.py

2011-10-03 Thread Brian Mehrman
match would help me to decipher the problem. I hope this helps, Brian On Mon, Oct 3, 2011 at 9:56 AM, He Jibo wrote: > Hello, > > I want to match a url in urls.py. Can you teach me how to do it? Thanks.I > have tried the following two versions. But as long as I put a . (dot) in the >

Re: how to match a url in urls.py

2011-10-03 Thread Javier Guerra Giraldez
On Mon, Oct 3, 2011 at 9:56 AM, He Jibo wrote: >    (r'^pagerank/(?P([/w-]+/.)+[/w-]+.([^a-z])(/[/w-: > ./?%&=]*)?|[a-zA-Z/-/.][/w-]+.([^a-z])(/[/w-: ./?%&=]*)?)', > 'ueseo.pagerank.views.CheckPageRankStatic'),# a static page version of page > rank check is that a copy/paste? i think you're usin

Re: how to match a url in urls.py

2011-10-03 Thread Bjarni Rúnar Einarsson
The complaint about invalid ranges probably stems from the fact that you have '-' in the middle of your character lists. If you do not mean [a-z], you should always make the dash the last character, like so: [az-]. The expression as pasted is requesting ranges [w-:] in a couple of places, which i

Re: {% url 'admin:jsi18n' as jsi18nurl %} error as urls.py

2012-01-06 Thread Brett Epps
I don't see an obvious problem with your urls.py file. Have you tried checking that you're not mixing tabs and spaces in that file's whitespace? Brett On 1/6/12 8:48 AM, "MikeKJ" wrote: >This is probably an oldie and I remember coming across it before but >da

Problem with the urls.py "unexpected end of pattern"

2012-08-17 Thread Rafael Romero Carmona
Hi, I'm learning Django and I have problems with the urls.py. I show you how that's writed: from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('users.views', url(r'^volunters/$'

Re: Ho can I reverse urls inside urls.py?

2013-10-08 Thread Tom Evans
> > This is the relevant part of my urls.py, I marked the prolematic parts in > red: > > > url(r'^password/reset/$','django.contrib.auth.views.password_reset',{'post_reset_redirect' > : '/accounts/password/reset/done/', 'template_name

Re: Ho can I reverse urls inside urls.py?

2013-10-08 Thread Bill Freeman
m.au/2012/07/django-resetting-passwords-with.html>I > implemented a password reset function. > > Unfortunately, currently this only works on the development server because > the base URLs for the post_reset_redirect are different on the production > server. > > This is th

Re: Ho can I reverse urls inside urls.py?

2013-10-09 Thread DJ-Tom
Hi Tom, works like a charm - THX! Cheers Thomas Am Dienstag, 8. Oktober 2013 17:49:18 UTC+2 schrieb Tom Evans: > > > Use reverse_lazy > > https://docs.djangoproject.com/en/1.5/ref/urlresolvers/#reverse-lazy > > > Cheers > > Tom > -- You received this message because you are subscribed to

How to get the urls defined in urls.py

2007-12-18 Thread shabda
I have my urls.py defined as urlpatterns = patterns('app.views', (r'^foo/$', 'foo'), (r'^bar/$', 'bar'),) Now from a template i need to access these urls. So inside the template we can refer them as /foo/, /bar/. However later when I

Re: Polls tutorial suggested mysite/mysite/urls.py improvement

2017-08-26 Thread Jim Fuqua
improved. > > https://docs.djangoproject.com/en/1.11/intro/tutorial01/ > > In the "Write your first view" section it says ... > > The next step is to point the root URLconf at the |polls.urls| module. > In |mysite/urls.py|, add an import for |django.conf.urls.include| a

Re: Polls tutorial suggested mysite/mysite/urls.py improvement

2017-08-26 Thread Derek
1/intro/tutorial01/ > > In the "Write your first view" section it says ... > > The next step is to point the root URLconf at the |polls.urls| module. > In |mysite/urls.py|, add an import for |django.conf.urls.include| and > insert an |include()| > <https://docs

Re: Polls tutorial suggested mysite/mysite/urls.py improvement

2017-08-27 Thread Mike Dewhirst
ate a file called ``urls.py``. +To create a URLconf in the polls directory, create a new file called ``urls.py``.  Your app directory should now look like:: polls/ @@ -282,10 +282,31 @@ url(r'^$', views.index, name='index'), ] -The next step is to poin

Re: Django 1.4 urls.py deprecated, urlpatterns to change

2019-11-09 Thread Motaz Hejaze
dlr, wrote: > I try to compile an old code in Django 1.4 Many things are deprecated. I > manage to change some of them but I don't knwo how to go futher on the > urls.py > > here is the old code > > > *from django.conf.urls.defaults import * > from django.conf impor

Re: got url error in app/urls.py file

2023-06-06 Thread Paul Haguet
It's extremely basic error... File urls.py line 3 the import is invalid as it say into the trace. cretae??? Where is this function? I think "create" is the good function name: canno't import name crétin from 'audio_api.views... Le mardi 6 juin 2023 à 14:15:25 UTC+2, AK

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 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 to end

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

2009-09-05 Thread Jim Myers
Thanks, but that doesn't do it either. I changed the regex to: ^portal/student/(?P\S+)/profile_edit/$ and it still doesn't match :( On Sep 5, 9:44 pm, Karen Tracey wrote: > On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers wrote: > > > Hi, I'm using this regex in urls.

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

2009-09-05 Thread Karen Tracey
ngo. There's got to be something else going on in your scenario... Karen On Sep 5, 9:44 pm, Karen Tracey wrote: > > On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers wrote: > > > > > Hi, I'm using this regex in urls.py: > > > > > r'^portal/student/(?P\S

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

2009-09-05 Thread Graham Dumpleton
ou. The regex now matches the url you specified. > url mapping isn't fundamentally broken in Django.  There's got to be > something else going on in your scenario... There is always the failing to restart Apache after changes option. ;-) Graham > Karen > > On Sep 5, 9:4

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 django-users@googlegro

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$', 'foo.FooModel.edit'

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread Matt Hoskins
ould like to implement this regexp: > ^pric(e|es)/ > into urls.py, but the () are overlapping with the text capture, as it > seems. If you want to use parentheses that don't capture use "?:" to flag it as non-grouping. So instead try: ^pric(?:e|es)/ Matt --~--~-~--~--

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread Thierry Schork
> > It's simply an OR done into the matching. Taking the simpliest, I > > would like to implement this regexp: > > ^pric(e|es)/ > > into urls.py, but the () are overlapping with the text capture, as it > > seems. > > If you want to use parentheses that d

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread titaniumlou
t; It's simply an OR done into the matching. Taking the simpliest, I > > > would like to implement this regexp: > > > ^pric(e|es)/ > > > into urls.py, but the () are overlapping with the text capture, as it > > > seems. > > > If you want to use parent

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread Thierry Schork
ing. Taking the simpliest, I > > > > would like to implement this regexp: > > > > ^pric(e|es)/ > > > > into urls.py, but the () are overlapping with the text capture, as it > > > > seems. > > > > > If you want to use parenthese

Re: urls.py and adding an OR to the regexp

2008-05-28 Thread Matt Hoskins
On May 28, 2:06 pm, [EMAIL PROTECTED] wrote: > Couldn't you also use something along the lines of > ^price[s]/ > > Though I may have the syntax wrong. Just to correct your syntax the regular expression for making the last letter in that example optional would be: ^prices?/ Matt --~--~

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 > >     > &g

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

2010-04-20 Thread Alan
low from all > >IndexOptions FancyIndexing > > > > >Alias /outputs/ "/##/outputs/" > > > > Order allow,deny > >Options Indexes > >Allow from all > >IndexOptions FancyIndexing > >

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. > > Fine. But still, I

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 name for the folder re > > outputs. So if I go tohtt

Problems with running Hello world app, urls.py probably ignored

2011-04-23 Thread Honza Javorek
containing init, models, tests and views. Moreover, in project directory "john" are init, manage, settings and urls files. My urls.py: from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('john', (r'^$', 'dashboard.views.he

Re: a little help with the urls.py and views.py

2011-07-22 Thread Derick Felsman
umber of different > authors) and then query for an entry that has all of the specified > authors, what would be the best way to go about doing that. > > urls.py and views.py code examples would be appreciated.  Thanks. -- You received this message because you are subscribed to the Google Gr

Re: a little help with the urls.py and views.py

2011-07-22 Thread Andre Terra
t; > authors, what would be the best way to go about doing that. > > > > urls.py and views.py code examples would be appreciated. Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to t

Re: Problem with the urls.py "unexpected end of pattern"

2012-08-17 Thread Alexis Roda
Al 17/08/12 17:42, En/na Rafael Romero Carmona ha escrit: Hi, I'm learning Django and I have problems with the urls.py. I show you how that's writed: from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns(&#

Re: Problem with the urls.py "unexpected end of pattern"

2012-08-17 Thread Rafael Romero Carmona
2012/8/17 Alexis Roda > Al 17/08/12 17:42, En/na Rafael Romero Carmona ha escrit: > > Hi, I'm learning Django and I have problems with the urls.py. I show you >> how that's writed: >> >> from django.conf.urls import patterns, include, url &

Re: Problem with the urls.py "unexpected end of pattern"

2012-08-17 Thread Alexis Roda
I think that this is not the problem because I can access to volunters without problems. I have problems only with admin, organizers and events paths. So you have problems with all the urls past the first with a wrong pattern. ~$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.

Re: Problem with the urls.py "unexpected end of pattern"

2012-08-18 Thread Rafael Romero Carmona
2012/8/17 Alexis Roda > I think that this is not the problem because I can access to volunters >> without problems. I have problems only with admin, organizers and events >> paths. >> > > So you have problems with all the urls past the first with a wrong pattern. > > ~$ python > Python 2.6.5 (r26

Help setting up urls.py to handle predominantly static site

2007-10-12 Thread Jason
index.html" % (path,))), * (r'^(?P.*)$', direct_to_template), ...but I've had no luck w/either of those. Anyone had any experience w/this? I'd really like to establish a catch-all-- very specific Django-pages defined first in my urls.py, then everything else passes

Re: How to get the urls defined in urls.py

2007-12-18 Thread James Bennett
On Dec 18, 2007 8:10 AM, shabda <[EMAIL PROTECTED]> wrote: > Now from a template i need to access these urls. So inside the > template we can refer them as /foo/, /bar/. However later when I > change the urls.py, these urls defined in urls.py would break. What > would be a go

Re: How to get the urls defined in urls.py

2007-12-18 Thread Rajesh Dhawan
On Dec 18, 9:10 am, shabda <[EMAIL PROTECTED]> wrote: > I have my urls.py defined as > urlpatterns = patterns('app.views', > (r'^foo/$', 'foo'), > (r'^bar/$', 'bar'),) > > Now from a template i need to ac

'python manage.py startapp polls' doesn't generate urls.py in polls

2020-12-07 Thread Julie Reier
Hi! I'm following the tutorial at https://docs.djangoproject.com/en/3.1/intro/tutorial01/. When running the 'python manage.py startapp polls' command, the urls.py file is generated in the top level directory, but not in the polls directory. I even tried the tutorial a second t

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 same bolierplate code for those me

Re: Problems with running Hello world app, urls.py probably ignored

2011-04-23 Thread Rafael Durán Castañeda
I'm not sure, I'm quite new in django, but I think you need to include dashboard in INSTALLED_APPS and looking your urls.py in order to see hello view you need to type http://127.0.0.1:8000/john/hello On 23/04/11 21:57, Honza Javorek wrote: Hello guys, I have searched to solve

Re: Problems with running Hello world app, urls.py probably ignored

2011-04-25 Thread Jacob
> I have read all known "my first app in django" tutorials, but my test > app just isn't working. > > I have project called "john". In it's directory I have app package > "dashboard" containing init, models, tests and views. Mor

Re: Help setting up urls.py to handle predominantly static site

2007-10-13 Thread SmileyChris
On Oct 13, 4:09 pm, Jason <[EMAIL PROTECTED]> wrote: > Hey everyone-- > > I've got a predominantly static site that I need to serve through > Django, at least until I can convert more of it over properly. Yes, I > know this is discouraged, but it's the only way I'm going to be able > to move fo

Setting up Django for the first time, urls.py and settings.py

2017-10-01 Thread drone4four
checks.run_checks(**kwargs) > File > "/home/gnull/.local/lib/python2.7/site-packages/django/core/checks/registry.py", > > line 81, in run_checks >new_errors = check(app_configs=app_configs) > File > "/home/gnull/.local/lib/python2.7/site-packages/django/co

<    1   2   3   4   5   >