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: Cumulative Sum per month

2020-03-05 Thread krnrrr
what do you mean by "cumulative"? if we have aggregate sums like jan = 100 feb = 150 mar = 120 you want to have output as jan = 100 feb = 250 mar = 370 ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

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

Custom User

2020-03-05 Thread Kushal Neupane
I am trying to build a resturant management system. I made a super user. Now, i am trying to make cashier and finance users which must be assign by the super admin. Can i do it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

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

help on how to pass a many to many field to form template

2020-03-05 Thread Tosin Ayoola
good day, I have to models, using a many to many relationship, I want to access the fields in they model in my form template, how do i achieve this? i attached my view, model and template code screenshot, hopping anyone can help -- You received this message because you are subscribed to the Googl

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

django unittest with option --keepdb

2020-03-05 Thread 麻吉柯省
I'm trying to use Django to create unit test cases.(I use PyMySQL==0.9.3) When I run python manage.py test -k Then I got an exception: Got an error creating the test database: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the

Re: Running into a "Cannot assign... must be a ...instance" error

2020-03-05 Thread Sachin Ranadive
Change view code, assign User object instead. author = User.objects.get(username=request.POST["username"]) Sachin On Thu, Mar 5, 2020, 4:00 AM Joey Jo Jo Jr wrote: > New to Django. > > I'm trying to set up a simple comment form where I can add a title for the > comment, content of the comment,

Re: Running into a "Cannot assign... must be a ...instance" error

2020-03-05 Thread Sachin Ranadive
Or ignore the form username field; author=request.user Sachin Ranadive On Thu, Mar 5, 2020, 8:17 PM Sachin Ranadive wrote: > Change view code, assign User object instead. > > author = User.objects.get(username=request.POST["username"]) > > Sachin > > On Thu, Mar 5, 2020, 4:00 AM Joey Jo Jo Jr

Need help understanding how to use ForceRHR/ForcePolygonCW

2020-03-05 Thread Julianne Bielski
I have a model with a field called 'geom' that is a MultiPolygonField. When I query for instances of the model, I'd like the data in this field to follow the right hand rule. Because I am using PostGIS on the back end, I have support for ForceRHR (I am using Django 2.06), but I can't figure out

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread V. J
Zdravím vás, myslíme že přístup byl udělen jen pár lidem kteří odvádí dobrou práci, jelikož by bylo dost nebezpečné udělit přístup všem, tak pokud vas mohu poprosit obraťte se s žádostí na ně. A pokud uznaji za vhodné že je to potřeba, provedou opravu, nebo doplnění. Pokud se mýlím, tak mě kontaktu

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: Unable to install / build docx module

2020-03-05 Thread 'MH' via Django users
I can also not install lxml via pip3. Here is a short part of the output: cc -I/usr/include/libxml2 -c /opt/tmp/xmlXPathInit80x1qqz_.c -o opt/tmp/ xmlXPathInit80x1qqz_.o unable to execute 'cc': No such file or directory

Re: Unable to install / build docx module

2020-03-05 Thread 'MH' via Django users
So, even as someone who has not so much experience in these things I would say that I lack three things: libxml2, libxslt, and usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc About the first two: I cannot do an apt-get. I am working on a synology diskstation.

Re: Documentation misspelling - Django 3 - maybe

2020-03-05 Thread Andréas Kühne
If you check the code for the PasswordChangeView, the default template is 'registration/password_change_form.html'. So you are incorrect. Regards, Andréas Den ons 4 mars 2020 kl 18:19 skrev Norbert Rácz : > Here: > https://docs.djangoproject.com/en/3.0/topics/auth/default/#django.contrib.auth.

Re: Unable to install / build docx module

2020-03-05 Thread Kasper Laudrup
Hi MH, On 05/03/2020 23.48, 'MH' via Django users wrote: So, even as someone who has not so much experience in these things I would say that I lack three things: libxml2, libxslt, and usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc About the first two: I cannot d

Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Philip Means
I am new to web development. Wanted to help my daughter with a simple website (she does pet portraits) and learn something that interests me. I watched some you tube tutorials, then bought a book. First couple simple projects went OK. Then I got to templates and I have not been able to get

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Jorge Gimeno
On Thu, Mar 5, 2020 at 6:04 PM Philip Means wrote: > I am new to web development. Wanted to help my daughter with a simple > website (she does pet portraits) and learn something that interests me. I > watched some you tube tutorials, then bought a book. First couple simple > projects went OK.

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Shishir Jha
Can you show the code that you have written upto page 55? -- 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. To view this

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Shishir Jha
Can you show the code that you have written until page 55? On Fri, 6 Mar 2020, 9:01 am Philip Means, wrote: > Thank you for your response. The book is Django for Beginners, by William > S. Vincent. I will copy and send you the chapter I am having trouble > with. My directory structure, as cr

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: Unable to install / build docx module

2020-03-05 Thread 'MH' via Django users
Dear Kasper I will google how I can do this cross compiling. Just recently a friend told me that this could not be done, because it would always have to be done on the same machine. I guess there is no way around that. How would an environment help? Best regards MH -- You received this messa

Re: Beginner needs help getting templates to work - is this the right group?

2020-03-05 Thread Jorge Gimeno
On Thu, Mar 5, 2020 at 8:01 PM Shishir Jha wrote: > Can you show the code that you have written until page 55? > > > On Fri, 6 Mar 2020, 9:01 am Philip Means, wrote: > >> Thank you for your response. The book is Django for Beginners, by >> William S. Vincent. I will copy and send you the chapt

issues deploying django project to cpanel

2020-03-05 Thread Tosin Ayoola
good morning guys, i'm trying to deploy my project on cpanel but i'm encountering this err msg, hoping anyone can help me out i have the screen shot of the msg below tnks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: Unable to install / build docx module

2020-03-05 Thread Kasper Laudrup
Hi MH, On 06/03/2020 06.41, 'MH' via Django users wrote: I will google how I can do this cross compiling. Just recently a friend told me that this could not be done, because it would always have to be done on the same machine. I guess there is no way around that. Your friend is wrong. If yo

Re: Unable to install / build docx module

2020-03-05 Thread 'MH' via Django users
Thanks Kasper, I will think about this. Yes, it is kind of intimidating. But it is also too early for me to give up. And given all the praise for such NAS devices I am really somewhat angry when I see that it seems to be a too difficult challenge just to get small webserver with a few python sc