Re: Stuck with Django

2023-03-21 Thread Jeman Kumar
hello sir, Did you add the apps in the setting.py file? On Tue, 21 Mar, 2023, 9:23 pm Vairamuthu Puvanachandran, < vai.pu...@gmail.com> wrote: > I am 76 yr old retired Engineer in Canada. > > > > I am new to Python and Django. > > > > I was looking for help and I found your site. > > > > I am stu

Re: Stuck with Django

2023-03-21 Thread Jeman Kumar
you have to add apps to "installed apps" list in settings.py On Tue, 21 Mar, 2023, 9:26 pm Jeman Kumar, wrote: > hello sir, Did you add the apps in the setting.py file? > > On Tue, 21 Mar, 2023, 9:23 pm Vairamuthu Puvanachandran, < > vai.pu...@gmail.com> wrote: > >> I am 76 yr old retired Engine

Re: Stuck with Django

2023-03-21 Thread Abdulrahman Abbas
Your attached pictures are not clear On Tue, Mar 21, 2023, 16:53 Vairamuthu Puvanachandran wrote: > I am 76 yr old retired Engineer in Canada. > > > > I am new to Python and Django. > > > > I was looking for help and I found your site. > > > > I am stuck now. > > > > I followed the “polls.app” t

Re: Stuck with Django

2023-03-21 Thread yash thadani
Hi Vairam What exactly you are stuck with? Regards Yash On Tue, Mar 21, 2023 at 9:23 PM Vairamuthu Puvanachandran < vai.pu...@gmail.com> wrote: > I am 76 yr old retired Engineer in Canada. > > > > I am new to Python and Django. > > > > I was looking for help and I found your site. > > > > I am

Re: Stuck with Django

2023-03-21 Thread Vairamuthu Puvanachandran
my settings.py is having a problem right now, miss matching of the "(", "{" and "[" Can you help me to resolve that? vairam TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': (os.path.join[BASE_DIR, 'templates']), 'APP_DIRS': True

Re: Stuck with Django

2023-03-21 Thread Jeman Kumar
see the "{" bracket near options? you didn't close it sir. On Wed, 22 Mar, 2023, 1:07 am Vairamuthu Puvanachandran, < vai.pu...@gmail.com> wrote: > my settings.py is having a problem right now, miss matching of the "(", > "{" and "[" > > Can you help me to resolve that? > > vairam > > TEMPLATES

Stuck with Django Tutorial Part 4

2023-03-14 Thread Nithin Kumar
Hi, Stuck with this problem https://docs.djangoproject.com/en/4.1/intro/tutorial04/ NoReverseMatch at /polls/2/Reverse for 'vote' with arguments '(2,)' not found. 1 pattern(s) tried: ['polls/ {% csrf_token %} {{ question.question_text }} {% if error_message %}{{ error_

Stuck with Django on a Synology Diskstation

2020-03-02 Thread 'MH' via Django users
Hi there I am rather a newbie, but after some problems I got django installed on my Synology Diskstation. So, I ignored many other problems and am very happy that I built my very first, very simple app. And now I would like to move it from the development stage to the production stage. Obviousl

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Muhammad Juwaini Abdul Rahman
question_id=question.id On Tue, 14 Mar 2023 at 21:22, Nithin Kumar wrote: > Hi, > > Stuck with this problem > > https://docs.djangoproject.com/en/4.1/intro/tutorial04/ > > NoReverseMatch at /polls/2/Reverse for 'vote' with arguments '(2,)' not > found. 1 pattern(s) tried: ['polls/ > My detail.ht

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Prosper Lekia
Let's see your views. On Tue, Mar 14, 2023, 14:32 Muhammad Juwaini Abdul Rahman wrote: > question_id=question.id > > On Tue, 14 Mar 2023 at 21:22, Nithin Kumar > wrote: > >> Hi, >> >> Stuck with this problem >> >> https://docs.djangoproject.com/en/4.1/intro/tutorial04/ >> >> NoReverseMatch at /

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Nithin Kumar
question.id or question_id both gave the same result. These are the views. from django.shortcuts import get_object_or_404, render from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import loader from .models import Choice,Question from django.urls import reve

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Sandip Bhattacharya
Can you share your urls.py? > On Mar 14, 2023, at 1:33 AM, Nithin Kumar wrote: > > Hi, > > Stuck with this problem > > https://docs.djangoproject.com/en/4.1/intro/tutorial04/ > > NoReverseMatch at /polls/2/Reverse for 'vote' with arguments '(2,)' not > found. 1 pattern(s) tried: ['polls/

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Brian Carey
I think you need to check your urls.py. ⁣Get BlueMail for Android ​ On Mar 14, 2023, 1:33 PM, at 1:33 PM, Nithin Kumar wrote: >question.id or question_id both gave the same result. >These are the views. > >from django.shortcuts import get_object_or_404, render >from django.http import HttpResp

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Prosper Lekia
This should be your views for vote. from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from .models import Choice, Question # ... def vote(request, question_id): question = get_object_or_404(Questi

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Nithin Kumar
Here. urls.py from django.urls import path from . import views app_name = 'polls' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('/', views.DetailView.as_view(), name='detail'), path('/results/', views.ResultsView.as_view(), name='results'), path('/vote

Re: Stuck with Django Tutorial Part 4

2023-03-15 Thread Chetan Ganji
It seems to me like you are not entering the url name In place of 'polls:vote' try to enter the name of the url given to that url For Your Reference https://docs.djangoproject.com/en/4.1/ref/templates/builtins/#url I hope it helps you! Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com h

Re: Stuck with Django on a Synology Diskstation

2020-03-02 Thread nitish kumar
Hi MH, what flavour of Linux you are using. if it is centos/redhat you can use below steps. $sudo yum install httpd24-devel.x86_64 gcc git $sudo python3.5 -m pip install mod-wsgi once installed you need to add site configuration and permissions to your Django code. $ cd ~/django_a

Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread Andréas Kühne
Hi, I don't think this is actually possible. Django runs python and not only simple html. Nginx and apache are simple webservers. So unless you can get good access to the terminal on the diskstation - I wouldn't even try this. Why do you want to have the application running on a disk station? Reg

Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread 'MH' via Django users
Dear nitish Thanks for your reply. I guess it is kind of a linux that Synology uses, but it is different from other distros. So many advice on the internet builds upon the ability to install packages via apt-get or ipkg, but both are not available here. Somehow (really only somehow) I got entwa

Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread 'MH' via Django users
Dear Andreas I want to build a little system, which consists of several django apps that help me in my daily life. But I don't want to upload documents about insurances and stuff to any cloud. Therefore I wanted a solution on premise and the NAS seemed to be a good choice. Could be wrong about

Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread Omar Abou Mrad
[Alternative] While this shouldn't be considered as a way to circumvent learning how to configure apache or nginx to serve/proxy python apps, you can also consider sticking to pure python dependencies (if this is for personal use). you can ignore the webserver completely and simply opt for [1] guni

Re: Stuck with Django on a Synology Diskstation

2020-03-04 Thread 'MH' via Django users
Hi Omar Actually I do not know why apache is better than the development webserver from django or gunicorn, but I wanted to give it a try. The installation worked. Now I am not sure what I am doing wrong: gunicorn project/wsgi.py:application [2020-03-04 13:46:26 +] [28939] [INFO] Starting

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Could anyone tell me how to start correctly the unicorn (integration)? -- 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-users+unsubscr...@googlegroups.com.

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread Omar Abou Mrad
Change your working directory to "project" (the directory containing wsgi.py) and use: gunicorn -w 4 wsgi:application It should work. On Thu, Mar 5, 2020 at 10:14 AM 'MH' via Django users < django-users@googlegroups.com> wrote: > Could anyone tell me how to start correctly the unicorn (integra

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Thanks Omar, but do I have to write something into that wsgi file? gunicorn -w 4 wsgi:application [2020-03-05 12:55:09 +] [29297] [INFO] Starting gunicorn 19.9.0 [2020-03-05 12:55:09 +] [29297] [INFO] Listening at: http://127.0.0.1:8000 (29297) [2020-03-05 12:55:09 +] [29297] [INFO]

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Thanks Omar, but do I have to write something into that wsgi file? gunicorn -w 4 wsgi:application [2020-03-05 12:55:09 +] [29297] [INFO] Starting gunicorn 19.9.0 [2020-03-05 12:55:09 +] [29297] [INFO] Listening at: http://127.0.0.1:8000 (29297) [2020-03-05 12:55:09 +] [29297] [INFO]

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Somehow I cannot write everything into one post that I wanted to reply. Here comes the rest of my original post. gunicorn -w 4 wsgi:application [... continued ...] Traceback (most recent call last): File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker File

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread Omar Abou Mrad
Is django installed properly? Are you still able to use runserver? What happens when you run the following? python -c "import django.core.wsgi" && echo "Yup, works!" also, looking further into your error log, make sure you're in the proper directory. (i may have given you the wrong one earlier, r

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Dear Omar python -c "import django.core.wsgi" && echo "Yup, works!" Traceback (most recent call last): File "", line 1, in ImportError: No module named django.core.wsgi but python3 manage.py runserver 0:8000 Watching for file changes with StatReloader Performing system checks... System check

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread Omar Abou Mrad
gunicorn is yielding the same error as the standard python command I gave you, whereas you use python3 to fire up the django development server. I'll venture a guess and say the problem is due to the environment. Are you using any virtual environment or installing system wide? How did you install

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
To be quite honest, this is really challenging for me, because the synology OS drove me nuts. I am under the impression that I have multiple installations of python and pip running now. In order to get an overview, I will now try to find every pip on my system and to install gunicorn everywher

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
/volume1/@appstore/py3k/usr/local/bin$ ./pip install gunicorn Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/ python3.5/site-packages (20.0.4) Requirement already satisfied: setuptools>=3.0 in

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread Omar Abou Mrad
As of Python 3.3 virtual environments are builtin, it would be wise to get used to them. https://docs.python.org/3/library/venv.html On Thu, Mar 5, 2020 at 4:57 PM 'MH' via Django users < django-users@googlegroups.com> wrote: > /volume1/@appstore/py3k/usr/local/bin$ ./pip install gunicorn > Defa

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
gunicorn -w 4 wsgi:application [2020-03-05 15:55:51 +] [4472] [INFO] Starting gunicorn 19.9.0 [2020-03-05 15:55:51 +] [4472] [INFO] Listening at: http://127.0.0.1:8000 (4472) [2020-03-05 15:55:51 +] [4472] [INFO] Using worker: sync [2020-03-05 15:55:51 +] [4483] [INFO] Booting wor

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Dear Omar but would that help me right now? Besides the problem of finding the right pip, I mean? As you can see, even now my gunicorn won't work :( On Thursday, March 5, 2020 at 4:04:46 PM UTC+1, Omar Abou Mrad wrote: > > As of Python 3.3 virtual environments are builtin, it would be wise to

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Is there anything particular hat I have to write into that wsgi.py file? -- 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-users+unsubscr...@googlegroups.co

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread Omar Abou Mrad
Make sure you're in the root of the project and run: gunicorn -w 4 project.wsgi:application you dont need to change anything. On Thu, Mar 5, 2020, 10:51 PM 'MH' via Django users < django-users@googlegroups.com> wrote: > Is there anything particular hat I have to write into that wsgi.py file? >

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
If I am not totally mistaken it could be that gunicorn wants to work with python2.7 while I did everything with python3. But how could I direct gunicorn to take python3? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread V. J
kontaktujte a prenastavim pravidla přístupu. Přeji hezký den s pozdravem Vasek JachimOdesláno z mého telefonu Huawei Původní zpráva Předmět: Re: Stuck with Django on a Synology DiskstationOdesílatel: 'MH' via Django users Komu: Django users Kopie: Is there anything particular hat

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread 'MH' via Django users
Dear Omar Finally I figured out, which of my gunicorn versions belonged to the right python3 that I invoked earlier. Now it seems to start. I write seems because in the browser it now immediately gives me an error that it cannot find a certain module "docx". I will come back to that in a differ

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread Omar Abou Mrad
Reach out to me privately, I'll assist you further. On Fri, Mar 6, 2020 at 12:32 AM 'MH' via Django users < django-users@googlegroups.com> wrote: > Dear Omar > > Finally I figured out, which of my gunicorn versions belonged to the right > python3 that I invoked earlier. Now it seems to start. I w

Re: Stuck with Django on a Synology Diskstation

2021-07-14 Thread Tony Chang
Dear MH, I also stuck here. When I run *~*# python3 -m pip install mod-wsgi I got the same error message: RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apa