RE: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Mike Dewhirst
__init__.py in the new directory3. Move the monster views.py into ./views renaming it to original.py or something similar.4. Split original.py into as many useful individual views files as desired - including separate utilities file(s) etc.5. In __init__.py import each view used by your urls.py using

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Asim Sulehria
You are welcome On Mon, Sep 18, 2023 at 6:00 PM 'Simon Connah' via Django users < django-users@googlegroups.com> wrote: > Thank you! That got it working! > > --- Original Message --- > On Monday, September 18th, 2023 at 13:34, Asim Sulehria < > de.asimha...@gmail.com> wrote: > > You can

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread 'Simon Connah' via Django users
Thank you! That got it working! --- Original Message --- On Monday, September 18th, 2023 at 13:34, Asim Sulehria wrote: > You can just directly declare an array of URL Patterns in a separate file and > then import that file in the url files you want to make the main urls file > >

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Asim Sulehria
You can just directly declare an array of URL Patterns in a separate file and then import that file in the url files you want to make the main urls file On Mon, Sep 18, 2023 at 5:28 PM 'Simon Connah' via Django users < django-users@googlegroups.com> wrote: > Hi, > > I have an app which has a lot

Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread 'Simon Connah' via Django users
Hi, I have an app which has a lot of views and URLs and keeping them in just one file makes it really hard to manage because it is so long. I'd like to make a views and URLs folder which will allow me to break up views and URLs into different categories but I'm not sure what the best way to go

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, AKHIL KORE a écri

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

2020-12-07 Thread Julie Reier
Nevermind. I managed to create the missing file myself. On Monday, December 7, 2020 at 9:48:59 AM UTC-5 Julie Reier wrote: > 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,

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

2020-12-07 Thread Mohemed Misfar
Good evening, When u run the code python manage.py startapp, it wont create urls.py. You have to create it in your every apps after run that command. You will only have the urls.py file in your main app which has the settings.py. Thank you. On Mon, 7 Dec 2020 20:18 Julie Reier, wrote: > Hi!

'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 time, naming

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

2019-11-09 Thread Motaz Hejaze
ile 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(

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('minesweepr.views

Re: help with URLS.PY

2019-05-03 Thread Rob W
Sure. Here is my urls.py from django.conf.urls import url from django.contrib import admin from django.urls import path from vr_reporting_app.views import HomeView from vr_reporting_app.views import Local from vr_reporting_app.views import User from vr_reporting_app.views import School

Re: help with URLS.PY

2019-05-03 Thread anchal agarwal
ml page. i also have a menu on that page that will load up other html pages. >> however, when i add the path to urls.py and then the class def in views, it fails. i know it's something simple, what am i missing. >> >> As I said, the dashboard.html works, i just want another me

Re: help with URLS.PY

2019-05-03 Thread randmwheeler
I resolved this. On Thursday, May 2, 2019 at 5:21:59 PM UTC-4, randmw...@gmail.com wrote: > > new to django. so i have an app that displays an html page. i also have a > menu on that page that will load up other html pages. > however, when i add the path to urls.py and then t

Re: help with URLS.PY

2019-05-03 Thread Rob W
It does not, I changed the name, stil the same error > On May 2, 2019, at 8:23 PM, Abishek Goda wrote: > > > Hi, > >> >> As I said, the dashboard.html works, i just want another menu option to load >> the other html file. i have commented this out as it causes my app to break. > So the

Re: help with URLS.PY

2019-05-02 Thread Abishek Goda
Hi, > > As I said, the dashboard.html works, i just want another menu option to load > the other html file. i have commented this out as it causes my app to break. So the issue is with the map url. Can you try to use a different name? > > #path('map/', Map.as_view(), name='map'),

Re: help with URLS.PY

2019-05-02 Thread Chetan Ganji
pages. however, when i add the path to urls.py and then the class def in views, it fails. i know it's something simple, what am i missing. As I said, the dashboard.html works, i just want another menu option to load the other html file. i have commented this out as it causes my app to break. urls.py

help with URLS.PY

2019-05-02 Thread randmwheeler
new to django. so i have an app that displays an html page. i also have a menu on that page that will load up other html pages. however, when i add the path to urls.py and then the class def in views, it fails. i know it's something simple, what am i missing. As I said, the dashboard.html

Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread amit pant
other page >> after 10 sec or 20 sec. >> my 2nd problem is i dont know how to set (or) match the pattern in >> [application]/urls.py >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe

Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread Manjunath
ion > when certain condition is met i have to redirect to another page after 10 > sec or 20 sec. > my 2nd problem is i dont know how to set (or) match the pattern in > [application]/urls.py > > -- > You received this message because you are subscribed to the Google Group

Re: problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread Manjunath
, now in that function > when certain condition is met i have to redirect to another page after 10 > sec or 20 sec. > my 2nd problem is i dont know how to set (or) match the pattern in > [application]/urls.py > -- You received this message because you are subscribed to the G

problem in pattern matching in urls.py and redirecting to another page after few secs

2018-11-02 Thread praveen bhuvi
Now my 1st problem is in views.py i have a function , now in that function when certain condition is met i have to redirect to another page after 10 sec or 20 sec. my 2nd problem is i dont know how to set (or) match the pattern in [application]/urls.py -- You received this message because you

Re: Is it possible to construct reversible url names in urls.py using , regex etc

2018-06-25 Thread Mikkel Kromann
urn paths >From urls.py: from . models import GetItemPaths urlpatterns = GetItemPaths() + [ path('/to/some/other/views/'otherview.asView(), name='other_name'), ] lørdag den 23. juni 2018 kl. 15.08.04 UTC+2 skrev Melvyn Sopacua: > > On zaterdag 23 juni 2018 14:30:08 CEST Mikkel K

Re: Is it possible to construct reversible url names in urls.py using , regex etc

2018-06-23 Thread Melvyn Sopacua
On zaterdag 23 juni 2018 14:30:08 CEST Mikkel Kromann wrote: > In models.py: > def GetItemPaths():paths = [ ] > for i in [ 'Model1', 'Model2', 'Model3' ]: > p = path( i + '/list/', ItemListView.as_view(model=i), name=i + > '_list' ) > paths.append(p) > > return paths

Re: Is it possible to construct reversible url names in urls.py using , regex etc

2018-06-23 Thread Mikkel Kromann
So, I think I have a neat idea for solving my problem, simply make a function which returns a list of path() returns. In urls.py urlpatterns = GetItemPaths() + [ # other paths ] In models.py: def GetItemPaths():paths = [ ] for i in [ 'Model1', 'Model2', 'Model3' ]: p = path( i

Re: Is it possible to construct reversible url names in urls.py using , regex etc

2018-06-21 Thread Melvyn Sopacua
; ] > > From what I can see, my model name mName is passed only to the view and > apparently not to the name constructor inside urls.py > Also, while I do not entirely understand the reverse naming process, I > sense that it might not be too easy to reverse the url name if

Is it possible to construct reversible url names in urls.py using , regex etc

2018-06-21 Thread Mikkel Kromann
I have a lot of models (say 30 or 40) which are so similar, that I have handled them using slightly modified class based views. In urls.py: urlpatterns = [ path('list//',ItemListView.as_view()), path('create//', ItemCreateView.as_view()), path('update

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

2017-10-02 Thread Kishore Srinivas
Always have the documentation with you while following the old tutorials.when I was starting Django I had big problems while using a tutorial in Django 1.7 with Django 1.10, nothing worked, but using documentation you can pretty much find what had changed -- You received this message

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

2017-10-01 Thread Jani Tiainen
hecks >>return 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/.l

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

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

2017-08-27 Thread Mike Dewhirst
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 point the root URLconf

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

2017-08-26 Thread Derek
om/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

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

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

Re: [1.8 to 1.10] Why I had to set trailing slash to false in my DRF urls.py in order to make things work like before the update

2017-07-16 Thread Andréas Kühne
gt; settings. > > > I set trailingslash=False in my default router in Urls.py and now it > works. Why ? > > Thank you for your time :) > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscr

[1.8 to 1.10] Why I had to set trailing slash to false in my DRF urls.py in order to make things work like before the update

2017-07-16 Thread Luigi Mognetti
can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/X/2304/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings. I set trailingslash=False in my default router in Urls.py and now it works. Why ? Thank you for your time

Re: Criar aquivo urls.py

2016-12-19 Thread Avraham Serour
Tex e crie o arquivo com o > nome urls.py e coloque dentro dele o código relativo as urls... > > > Talvez você deva explicar melhor quais os problemas que você está tendo > > On Mon, Dec 19, 2016 at 5:42 PM, Itamar Junior <i...@ecomp.poli.br> wrote: > >> Olá galera, >&g

Re: Criar aquivo urls.py

2016-12-19 Thread Fabio C. Barrionuevo da Luz
uai, desde que arquivos python simplesmente são arquivos de texto, abra um editor de texto como o Notepad++, Gedit, SublimeTex e crie o arquivo com o nome urls.py e coloque dentro dele o código relativo as urls... Talvez você deva explicar melhor quais os problemas que você está tendo On Mon

Criar aquivo urls.py

2016-12-19 Thread Itamar Junior
Olá galera, sou no django, como posso fazer para criar um arquivo urls.py? Obrigado. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

Re: How modify Django to set URLs with decorators on the view functions like Flask? (rather than using urls.py)

2016-09-10 Thread Michal Petrucha
On Fri, Sep 09, 2016 at 10:11:25PM -0700, Chris Seberino wrote: > Flask has a neat design where instead of having a urls.py file they bind > URLs to view functions with decorators. > > Possible to do something similar with Django? What modifications would be > needed?

How modify Django to set URLs with decorators on the view functions like Flask? (rather than using urls.py)

2016-09-09 Thread Chris Seberino
Flask has a neat design where instead of having a urls.py file they bind URLs to view functions with decorators. Possible to do something similar with Django? What modifications would be needed? Thanks, cs -- You received this message because you are subscribed to the Google Groups

Re: TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread James Schneider
On Sep 5, 2016 6:06 AM, "arun kumar" wrote: > > Hi, > >I'm working in Django 1.10 and I got the type error in the below file at this line " url(r'^$', views.dashboard, name = 'dashboard')," > > from django.conf.urls import include, url > from . import views > >

Re: TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread 'Abraham Varricatt' via Django users
Not sure what the issue is without more info about the error, but is the regular expression for that view correct? Assuming that you want to divert folks to the root of your site can you try the following? url(r'^/$', views.dashboard, name = 'dashboard') NOTE: if the error still persists, it

TypeError: view must be a callable or a list/tuple in the case of include(). in urls.py

2016-09-05 Thread arun kumar
Hi, I'm working in Django 1.10 and I got the type error in the below file at this line "* url(r'^$', views.dashboard, name = 'dashboard'),*" *from django.conf.urls import include, url* *from . import views* *urlpatterns = [* *#preview login view* *#url(r'^login/$',views.user_login,

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-08 Thread Tim Graham
I'm not sure exactly what you're asking. Maybe you could give a concrete example. For a complex example, you could take a look at the urls.py for djangoproject.com: https://github.com/django/djangoproject.com/blob/249c3482982fc43afc6b6fa575fe79f938ebe472/djangoproject/urls/www.py

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Andrew Emory
Is there convention on import view as vs a separate URL file in every app? Is there separate URL in each app only used if you need to use include() ?? On Saturday, August 6, 2016 at 10:05:25 AM UTC-5, Tim Graham wrote: > > You're not missing something. You should imports. Sorry you don't like

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Tim Graham
You're not missing something. You should imports. Sorry you don't like the look of it, but that's Python. On Saturday, August 6, 2016 at 8:42:29 AM UTC-4, Andrew Emory wrote: > > I am having trouble with how I would intuitively get my url patterns to > work, by listing the actual path to the

deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Andrew Emory
I am having trouble with how I would intuitively get my url patterns to work, by listing the actual path to the view function. So it needs to be a callable, ok. But I don't like having 15+ from appname import views as appname_view. I can add a url.py file in each app and use include(). But

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

Django urls.py reload (not from database)

2016-06-23 Thread Thomas
Hy django lovers, it's my first post for being helped, sorry if I miss something. I want two list of urls available : - one (limited) before initializing (verify licence, etc...) - one (large) after initializing success Here is my settings.ROOT_URLCONF : from constance import config

Re: Django not adding / to end of URLS and since urls.py expects /, I now get 404s. How fix?

2016-04-23 Thread Michal Petrucha
On Sat, Apr 23, 2016 at 11:50:05AM -0700, Chris Seberino wrote: > I am trying to be consistent and make urls.py expect / after every url. > > The problem is Django isn't automatically adding / at the end and so now > I get 404s when I try to access my web pages. > &g

Django not adding / to end of URLS and since urls.py expects /, I now get 404s. How fix?

2016-04-23 Thread Chris Seberino
I am trying to be consistent and make urls.py expect / after every url. The problem is Django isn't automatically adding / at the end and so now I get 404s when I try to access my web pages. How fix? Thanks! Chris -- You received this message because you are subscribed to the Google Groups

urls.py

2014-10-02 Thread ashley kenney
on this server. My rango/urls.py from django.conf.urls import patterns, url from rango import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), (r'^/rango/about', 'rango.views.about'), ) My structure and following this exercise 3.7 at http

Re: In the Django documentation, Where can I found URLS.PY Symbol explanations?

2014-06-19 Thread Mike Dewhirst
On 20/06/2014 8:26 AM, Uzi Lumbroso wrote: ?In the Django documentation, Where can I found URLS.PY Symbol explanations (for example: (?P[-\w]+)). What is ... [-\w]+) matches I couldn’t find it in the Django documentation. Thanks for the help It is more or less plain Python

In the Django documentation, Where can I found URLS.PY Symbol explanations?

2014-06-19 Thread Uzi Lumbroso
?In the Django documentation, Where can I found URLS.PY Symbol explanations (for example: (?P[-\w]+)). What is ... [-\w]+) matches I couldn’t find it in the Django documentation. Thanks for the help -- You received this message because you are subscribed to the Google Groups "D

Re: Urls.py Question

2014-05-06 Thread James Schneider
You need to quote the argument being passed to include(): include('vmware.urls') There might be other things going on, but I'm on my phone and it's hard to follow. -James On Tuesday, May 6, 2014, G Z wrote: > I'm running 1.6.4 > > yes vmware is in my installed apps i used

Re: Urls.py Question

2014-05-06 Thread G Z
I'm running 1.6.4 yes vmware is in my installed apps i used from . import vmware if I dont try to link my appurls to project urls and just use admin site all my stuff works correctly its just when i try to add vmare project.urls from django.conf.urls import patterns, include, url from

Re: Urls.py Question

2014-05-06 Thread Rafael E. Ferrero
What version of django do you have runing?, do you define an admin for vmware? -- Rafael E. Ferrero 2014-05-06 2:50 GMT-03:00 G Z <zuk...@gmail.com>: > project name = provisioning app name = vmware > > In my projects urls.py I have the following. I assume I set the new url &

Urls.py Question

2014-05-06 Thread G Z
project name = provisioning app name = vmware In my projects urls.py I have the following. I assume I set the new url link customers to myapp.urls because im watching a youtube video and thats what he did. from django.conf.urls import patterns, include, url from django.contrib import admin

Re: invalid syntax (urls.py, line 10)

2013-12-12 Thread MikeKJ
Cheers DR, Moving on I think there are Klingons now. TemplateSyntaxError at /admin/honorary/member/ Exception Type: TemplateSyntaxError Exception Value: Caught TypeError while rendering: __init__() got an unexpected keyword argument 'core' Exception Location:

Re: invalid syntax (urls.py, line 10)

2013-12-12 Thread Daniel Roseman
On Thursday, 12 December 2013 13:33:47 UTC, MikeKJ wrote: > > Warning: This is a port from 0.97 to 1.3.7 (thanks DR) > > The front end of the site is working just the admin is being difficult > SyntaxError at /admin/honorary/member/ > > invalid syntax (urls.py, line 10) >

invalid syntax (urls.py, line 10)

2013-12-12 Thread MikeKJ
Warning: This is a port from 0.97 to 1.3.7 (thanks DR) The front end of the site is working just the admin is being difficult SyntaxError at /admin/honorary/member/ invalid syntax (urls.py, line 10) location /home/paston2/webapps/sevenkbw/lib/python2.7/django/utils/importlib.py

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

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

2013-10-08 Thread Bill Freeman
r. > > 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': > 'accounts/password_rese

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

2013-10-08 Thread Tom Evans
roduction > 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': > 'account

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': 'accounts/password_reset.html'}, name="pas

Re: Django 1.5 Tutorial Part 3, Test after Update of Polls/urls.py

2013-08-21 Thread Diek Kearney
Diek Kearney wrote: >> >> I am going through the Tutorial Django 1.5 Tutorial Part 3, and up to the >> current point everything was running smoothly, then I hit a wall that I >> cannot figure out. Maybe I am too focused on following, anyways I need some >> help. >&

Re: Django 1.5 Tutorial Part 3, Test after Update of Polls/urls.py

2013-08-21 Thread Diek Kearney
Thomas, like I explained to Mauro it was just confusing. Really I should have known the problem, I was working on it all last night and I guess I needed a break. That said, the tutorial is not clear. In line with the rest of the tutorial they should have used 1, vice 34. It works perfect with

Re: Django 1.5 Tutorial Part 3, Test after Update of Polls/urls.py

2013-08-21 Thread Diek Kearney
l that I >> cannot figure out. Maybe I am too focused on following, anyways I need some >> help. >> >> After I updated Polls/urls.py: >> >> from django.conf.urls import patterns, include, url >> >> >> from polls import views >> >> >

Re: Django 1.5 Tutorial Part 3, Test after Update of Polls/urls.py

2013-08-21 Thread Tom Lockhart
On 2013-08-20, at 9:02 PM, Diek Kearney wrote: > I am going through the Tutorial Django 1.5 Tutorial Part 3, and up to the > current point everything was running smoothly, then I hit a wall that I > cannot figure out. Maybe I am too focused on following, anyways I

Re: Django 1.5 Tutorial Part 3, Test after Update of Polls/urls.py

2013-08-21 Thread Mauro Rocco
out. Maybe I am too focused on following, anyways I need some > help. > > After I updated Polls/urls.py: > > from django.conf.urls import patterns, include, url > > > from polls import views > > > urlpatterns = patterns('', > >

Django 1.5 Tutorial Part 3, Test after Update of Polls/urls.py

2013-08-21 Thread Diek Kearney
I am going through the Tutorial Django 1.5 Tutorial Part 3, and up to the current point everything was running smoothly, then I hit a wall that I cannot figure out. Maybe I am too focused on following, anyways I need some help. After I updated Polls/urls.py: from django.conf.urls import

Re: urls.py not loading changes

2013-03-11 Thread Asier Hernández Juanes
I found a solution! I created a file /tmp/django.pid with the PID of the UWSGI master-process, then I executed in the shell the command uwsgi-core --reload /tmp/django.pid and the UWSGI process has restarted and the urls.py changes are working now. Thanks a lot for the help! El sábado, 9 de

Re: urls.py not loading changes

2013-03-09 Thread Asier Hernández Juanes
I have launched a "/etc/init.d/uwsgi restart" but the application is still not loading the changes in urls.py file. I think I have to kill the process because after restarting the uwsgi process the PID is still the same: *root@miami ~ # ps -fea|grep uwsgi uwsgi11916

Re: urls.py not loading changes

2013-03-09 Thread Asier Hernández Juanes
The problem is that I am administrating this server where the Django application was already installed and deployed so I don't have this information. However I have execute "ps -e" to view all the processes running on my server and I got this: PID TTY TIME CMD 1 ?

Re: urls.py not loading changes

2013-03-09 Thread Javier Guerra Giraldez
On Fri, Mar 8, 2013 at 6:14 PM, Asier Hernández Juanes wrote: > When I type "locate *.fcgi" I get no results at all that searches for files. no relation to processes. to help you, first we need to know a bit about your deployment architecture, specially which WSGI

Re: urls.py not loading changes

2013-03-09 Thread Asier Hernández Juanes
I understand but I cannot locate the FastCGI process to stop it. When I type "locate *.fcgi" I get no results at all so unfortunatelly I don't know how to stop the Django (or fastCGI) process itself. Can anyone help me, please? -- You received this message because you are subscribed to the

Re: urls.py not loading changes

2013-03-08 Thread Bill Freeman
Well, nginx is a proxy to the fastCGI application. So you can't access it from the usual URL when nginx is stopped, but that doesn't mean that the process to which you proxy, which is running Django, has stopped. On Fri, Mar 8, 2013 at 3:11 PM, Asier Hernández Juanes < asiertxo...@gmail.com>

Re: urls.py not loading changes

2013-03-08 Thread Asier Hernández Juanes
Maybe fastCGI but when I stop the nginx server with /etc/init.d/nginx stop the application is not loading. I have seen some fastCGI configuration inside nginx server but I don't know how to restart fastCGI process or Django process itself. How can I do that? El viernes, 8 de marzo de 2013

Re: urls.py not loading changes

2013-03-08 Thread Javier Guerra Giraldez
On Sun, Mar 3, 2013 at 8:16 AM, Asier Hernández Juanes wrote: > i have a remote Linux server with a Django application running in a nginx > server Django application's don't run in the nginx server. There must be some other process running your app. Either uWSGI,

Re: urls.py not loading changes

2013-03-08 Thread Asier Hernández Juanes
efer to delete the .pyc fie for issues such as these wherein >>>>> changes are not reflected despite server restart. >>>>> >>>>> On Sun, Mar 3, 2013 at 9:59 PM, Serge G. Spaolonzi >>>>> <se...@cobalys.com>wrote: >>>>&g

Re: urls.py not loading changes

2013-03-04 Thread Bill Freeman
gt;>>> >>>>> Maybe the server is loading an old .pyc file. try to delete the >>>>> urls.pyc file and restart the server. >>>>> >>>>> >>>>> On Sun, Mar 3, 2013 at 11:16 AM, Asier Hernández Juanes < >>>

Re: urls.py not loading changes

2013-03-04 Thread Venkatraman S
;wrote: >>> >>>> Maybe the server is loading an old .pyc file. try to delete the >>>> urls.pyc file and restart the server. >>>> >>>> >>>> On Sun, Mar 3, 2013 at 11:16 AM, Asier Hernández Juanes < >>>> asier...@gmai

Re: urls.py not loading changes

2013-03-04 Thread Bill Freeman
; >>> On Sun, Mar 3, 2013 at 11:16 AM, Asier Hernández Juanes < >>> asier...@gmail.com> wrote: >>> >>>> Hi everyone, >>>> >>>> i have a remote Linux server with a Django application running in a >>>> nginx server b

Re: urls.py not loading changes

2013-03-04 Thread frocco
gt;>> Hi everyone, >>> >>> i have a remote Linux server with a Django application running in a >>> nginx server but when I make a change in urls.py like adding a new >>> urlpattern the server is not applying the changes. I have restarted nginx >>>

Re: urls.py not loading changes

2013-03-04 Thread Venkatraman S
and restart the server. > > > On Sun, Mar 3, 2013 at 11:16 AM, Asier Hernández Juanes < > asiertxo...@gmail.com> wrote: > >> Hi everyone, >> >> i have a remote Linux server with a Django application running in a nginx >> server but when I make a cha

Re: urls.py not loading changes

2013-03-03 Thread Serge G. Spaolonzi
nginx > server but when I make a change in urls.py like adding a new urlpattern the > server is not applying the changes. I have restarted nginx server but the > new url is not loading. > > Does anyone know what may be the problem? > > Thanks a lot! > > -- > You rec

urls.py not loading changes

2013-03-03 Thread Asier Hernández Juanes
Hi everyone, i have a remote Linux server with a Django application running in a nginx server but when I make a change in urls.py like adding a new urlpattern the server is not applying the changes. I have restarted nginx server but the new url is not loading. Does anyone know what may

RE: Doubt in urls.py filter

2013-02-09 Thread Thiago Carvalho D' Ávila
Thanks Babatunde, I was aware of your solution. I am just curious if it is possible to make it just in the urls.py. Anyone? Em 09/02/2013 13:20, "Babatunde Akinyanmi" <tundeba...@gmail.com> escreveu: > >The problem I have is that I want to use a view (rather not modifing it

RE: Doubt in urls.py filter

2013-02-09 Thread Babatunde Akinyanmi
rom my Windows Phone -- From: Thiago Carvalho D' Ávila Sent: 2/9/2013 12:23 PM To: Django Users Subject: Doubt in urls.py filter Hello Guys, The problem I have is that I want to use a view (rather not modifing it) to show all person in a group. The problem is I don't k

RE: Doubt in urls.py filter

2013-02-09 Thread Babatunde Akinyanmi
Hi Thiago, I have believe MyListView is a subclass of ListView. The cleaner way to do what you are trying to achieve will be to override the get_queryset() method. The code you gave is not working because pk will not be available when python starts to evaluate your urls.py file. pk becomes 'alive

Doubt in urls.py filter

2013-02-09 Thread Thiago Carvalho D' Ávila
Hello Guys, The problem I have is that I want to use a view (rather not modifing it) to show all person in a group. The problem is I don't know how to use the pk in the regex to filter in the same line... I wanted something like: url(r'^groups/(?P\d+)/$',

Re: invalid syntax inside urls.py

2012-12-19 Thread Bill Freeman
and your >> parenthesis are not nested properly. >> >> >> On Tuesday, December 18, 2012 12:19:24 PM UTC-8, maiquel wrote: >>> >>> 'm trying to do the following >>> >>> Artigo.objects.all () inside urls.py >>> >

Re: invalid syntax inside urls.py

2012-12-18 Thread carlos
iquel wrote: >> >> 'm trying to do the following >> >> Artigo.objects.all () inside urls.py >> >> urlpatterns = patterns ('', >> # url (r '^ blog / $', 'blog.views.archive_index.**index') >> (r '^ $', 'django.views.generic.date_**based.archive

Re: invalid syntax inside urls.py

2012-12-18 Thread Chris Cogdon
Need a comma between the view name, and {'queryset...' and your parenthesis are not nested properly. On Tuesday, December 18, 2012 12:19:24 PM UTC-8, maiquel wrote: > > 'm trying to do the following > > Artigo.objects.all () inside urls.py > > urlpatterns = patterns ('', >

invalid syntax inside urls.py

2012-12-18 Thread maiquel
'm trying to do the following Artigo.objects.all () inside urls.py urlpatterns = patterns ('', # url (r '^ blog / $', 'blog.views.archive_index.index') (r '^ $', 'django.views.generic.date_based.archive_index' {'queryset': Artigo.objects.all ()), # invalid syntax 'date_field

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

Re: Retrieve current user id in urls.py

2012-11-27 Thread Daniel Roseman
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 = { >> 'queryset

Retrieve current user id in urls.py

2012-11-27 Thread Peter Edström
Hello, I've set up a user profile according to this<https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users>and now I'm trying to access the id of the currently logged in user in my urls.py, like this: # urls.py > from django.contrib.auth.d

Re: urls.py and default values...

2012-10-22 Thread Lachlan Musicman
On Mon, Oct 22, 2012 at 5:39 PM, Tomas Ehrlich wrote: > Hello, > you need to make 'year' argument optional: > > def student_reports(request, year=None): > year = year or datetime.date.today().year > ... Perfect - thanks > > Another option could be passing

  1   2   3   4   5   >