Re: How to trigger a function with an update view

2022-02-13 Thread 'MH' via Django users
Thanks for the specific advice. I will try that.

On Sunday, February 13, 2022 at 9:33:16 AM UTC+1 sebasti...@gmail.com wrote:

> Hello,
>
> You overwright in forms.py in your form save()
>
> Example:
>
> def save(self, commit=True):
> instance = super(MyForm, self).save(commit=False)
> instance.flag1 = 'flag1' in self.cleaned_data['multi_choice'] # etc
> if commit:
>         instance.save()
> return instance
>
>
> 'MH' via Django users  schrieb am Sa., 12. 
> Feb. 2022, 22:11:
>
>> Hi
>>
>> I have an update view which enables me via a form to update the data for 
>> a particular model object instance (as it should do). However, when a 
>> particular field gets changed I would not only need to update the fields in 
>> the database, but I would need the save routine of the update view to 
>> trigger a computation and to update another field with a new value as well. 
>> How can this be done?
>>
>> Best regards
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/8aa6e29d-77a9-4658-b0a6-f7d8b8af7993n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/8aa6e29d-77a9-4658-b0a6-f7d8b8af7993n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d67e1d82-d6dd-497e-9dd0-1129c039a81fn%40googlegroups.com.


How to trigger a function with an update view

2022-02-12 Thread &#x27;MH&#x27; via Django users
Hi

I have an update view which enables me via a form to update the data for a 
particular model object instance (as it should do). However, when a 
particular field gets changed I would not only need to update the fields in 
the database, but I would need the save routine of the update view to 
trigger a computation and to update another field with a new value as well. 
How can this be done?

Best regards

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8aa6e29d-77a9-4658-b0a6-f7d8b8af7993n%40googlegroups.com.


Re: Developing django apps in jupyter

2021-11-30 Thread &#x27;MH&#x27; via Django users
Thank you very much. Then I see that I should use jupyter only for other 
projects, but not for django. And you have provided me with alternatives. I 
always thought these IDEs would be very expensive.

On Monday, November 29, 2021 at 10:38:11 PM UTC+1 Kasper Laudrup wrote:

> On 29/11/2021 14.22, 'MH' via Django users wrote:
> > My two questions are:
> > 1. Do you use juypter for django development?
>
> No and I've never heard of it, but now I have. Thanks.
>
> > 2. If not, which editor or free IDE do you use?
> > 
>
> I use Emacs with Elpy (https://elpy.readthedocs.io/). There are some 
> Django specific modes for Emacs as well, but I've been quite happy with 
> just Python integration and haven't really felt the need for much more.
>
> The reason I prefer Emacs is that I can use the same editor not only for 
> the different programming languages I use, but also writing 
> documentation in e.g. Markdown and of course all the other more or less 
> exotic stuff you can do in Emacs.
>
> I've never really become good at Emacs or writing Elisp, but it's just 
> what I've used since I studied ages ago and I haven't really tried 
> anything else that could convince me to change.
>
> To be honest, I don't think I'd choose Emnacs today and I cannot exactly 
> recommend it, just though I'd share what I use since you asked :-)
>
> Kind regards,
>
> Kasper Laudrup
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/85cfcc5e-f1f8-46f0-880b-b56c476281d5n%40googlegroups.com.


Developing django apps in jupyter

2021-11-29 Thread &#x27;MH&#x27; via Django users
Hi everyone

I have built a few django apps, but on a very basic level and only for my 
own usage. Little helpers for self management. So far I just used vi(m).

Now I tried out jupyter for the first time. Looks great and thanks to a few 
links from Google I could also load the django kernel in jupyter. Still I 
am not sure how to use juypter in order to develop django apps. Is this 
making sense to you? I either have one of those 
demonstration-/documentation-oriented notebooks *or* I have a plain py file 
as usual in django apps.

My two questions are:
1. Do you use juypter for django development?
2. If not, which editor or free IDE do you use?

Best regards
M

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/32085ce1-4bdc-4dfe-a031-9e4d6b15c9abn%40googlegroups.com.


svg vs. canvas

2020-06-26 Thread &#x27;MH&#x27; via Django users
Hi

I have never rendered graphical objects for a web app, but now I want to 
generate process views. So, there should be something like a circle marking 
the process start, a rectangle box indication a subsequent activity, and 
another circle indicating the process end. Between these elements there 
should be arrows which connect the circles/box.

How would you start? Should I rather turn to svg or canvas?

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/969271be-4c53-4902-9d7d-42b3f8ca6adco%40googlegroups.com.


Re: How can I access in a template objects, which are in a list inside a dict?

2020-06-21 Thread &#x27;MH&#x27; via Django users
Thank you, I will try that.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7a7ccde4-6edf-41be-97f2-9aa63e53f644o%40googlegroups.com.


How can I access in a template objects, which are in a list inside a dict?

2020-06-21 Thread &#x27;MH&#x27; via Django users
Hi

I have context variable "convar". And this convar consists of a dictionary.

So, it might look like:

convar
| General case
|
|- Speical case A
|
|--Special case B

So, the general case and the special cases are the keys. And there values 
are lists. And in these lists I have several objects from the database, e.g.

{'General case': [, , and so on]}

Right now, I am just confused how to get to the single objects in a django 
template and there fields like Object A.object_field.

I only get the name of the keys of the dictionary by using something like 
{% for key_var in convar %} {{ key_var}} {% endfor %}

Can you tell me how to correctly get to the values of the objects? :)

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2099c7a7-abdd-42f2-91a3-bd9b2b3b8478o%40googlegroups.com.


How to pass the extra argument to an existing formset

2020-06-12 Thread &#x27;MH&#x27; via Django users
Hi

I have a formset that is created by an inline formset factory. So, I have 
seen that during the creation I can pass the extra argument in order to 
create more blank forms. Fine :)

But I also have the case where I want to pre-populate a formset based on 
entries in the database. In a way I thought I could just hit the database 
and lookup the number of matching entries like objects = 
Model.objects.filter(id=thatid).values().
And then I could pass the individual entry data to the forms in the 
formset. I have managed to do this for one form in the formset, but I do 
not know how to get django to create a formset with x extra forms in it, 
based on the number of database entries. I guess I could again create one 
formset with an inline formset factory, but is it also possible to use the 
initial formset that I already created in my forms.py and to somehow pass 
the extra argument?

Best regards

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a4aa49f0-9d30-4b19-b4cc-e1d715e97674o%40googlegroups.com.


Re: How to add entries dynamically

2020-06-05 Thread &#x27;MH&#x27; via Django users
Thank you. I will look into that :)

On Friday, June 5, 2020 at 3:23:21 PM UTC+2, Andréas Kühne wrote:
>
> Hi,
>
> This is a fairly common practice - I found this:
>
> https://dev.to/zxenia/django-inline-formsets-with-class-based-views-and-crispy-forms-14o6
>
> When googling for "inline formsets" because that's what you want. You can 
> of course choose some other tutorial - but I think this one explains it ok. 
> You will also need to do some javascript to get it working.
>
> Regards,
>
> Andréas
>
>
> Den fre 5 juni 2020 kl 15:00 skrev 'MH' via Django users <
> django...@googlegroups.com >:
>
>> Hi 
>>
>> I am coding a personal cookbook just for fun. On one site I want to be 
>> able to enter the ingredients, including the corresponding amount. So, I 
>> don't want to put all of that in one textarea, but in separate fields, so 
>> that I could recalculate the ingredient's amount if I have to cook for more 
>> people.
>>
>> Now to my question. Let's assume I enter 10 pcs. eggs. Then I would like 
>> to have a button that says "add one more ingredient". You see such things 
>> very often on websites and then another input line pops up, while the 
>> previous entries stay in their place. Do you know how to do that with 
>> django?
>>
>> Best regards
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f80fb1e0-7b2f-47bb-bd2e-7cec5edad579o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/f80fb1e0-7b2f-47bb-bd2e-7cec5edad579o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d05bfcb4-21e9-47c9-a5ed-e6dfb7d1cb4eo%40googlegroups.com.


How to add entries dynamically

2020-06-05 Thread &#x27;MH&#x27; via Django users
Hi 

I am coding a personal cookbook just for fun. On one site I want to be able 
to enter the ingredients, including the corresponding amount. So, I don't 
want to put all of that in one textarea, but in separate fields, so that I 
could recalculate the ingredient's amount if I have to cook for more people.

Now to my question. Let's assume I enter 10 pcs. eggs. Then I would like to 
have a button that says "add one more ingredient". You see such things very 
often on websites and then another input line pops up, while the previous 
entries stay in their place. Do you know how to do that with django?

Best regards

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f80fb1e0-7b2f-47bb-bd2e-7cec5edad579o%40googlegroups.com.


UpdateView and def post()

2020-06-02 Thread &#x27;MH&#x27; via Django users
Hi

I want to modidy my view that is based on UpdateView and it should work 
when called via post method.

This is what I have so far and I am not sure if it makes sense or if it 
could be done in an easier way.

class GD_Update(UpdateView):
# setting the model, form_class and template_name
model = ImmoGrunddaten
form_class = form_immogrunddaten_anlegen
template_name = templ_folder_name + 'gd_update.html'

# what should happen if the updateview was successful
def get_success_url(self):
gdid = self.object.pk
return reverse_lazy(url_app_name + 'gd_ansehen', kwargs={'pk':gdid})

# I guess that I need this in order to get the data from the database and 
to populate the form
def get_object(self, queryset=None):
self.queryset = ImmoGrunddaten.objects.get(id = self.to_update)
return self.queryset

# Here is the handling of the post calls
def post(self, request, pk):
# this is when I did not push a button like "confirm update", meaning the 
first call of the view via post method
if not self.request.POST.get('action', False) == 'aktualisieren':
self.to_update = pk
self.object = self.get_object()
return super(GD_Update, self).post(request, pk)
else:
# and this is what happens if the confirm button was pushed. Now I want to 
save the changes to the database. But I don't know how.
context = {
'fehlermeldung': 'das update handling wurde noch nicht 
hinterlegt'
}
return render(request, templ_folder_name + 'fehlerseite.html', 
context)


-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a53a5b7-1f0f-4176-adac-9bbcb251995c%40googlegroups.com.


Access filefield's/imagefield's url in template

2020-05-08 Thread &#x27;MH&#x27; via Django users
Hi

I just saw that when I pass not an object, but a queryset with values_list 
to a template, I cannot access a filefield like object.field_name.url, as 
url is a property. 

Can you give me advice how to get from the values_list to the url property?

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ed532302-5c1a-4225-be9f-44a8bdb4cb8d%40googlegroups.com.


Pass post data to UpdateView

2020-04-26 Thread &#x27;MH&#x27; via Django users
Hi

I do not know how to access request.POST, when I call UpdateView. Just to 
avoid a misunderstanding: I do not want to process the data after updating 
a model, but I want to pass a parameter to the UpdateView, which is not 
model related when the page opens.

But I get a NameError that request is not defined. How can I make the POST 
data accessible?

Thanks!

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e13ecd0-93f9-4847-a93b-2439efe277ee%40googlegroups.com.


Re: How to generate breadcrums

2020-04-16 Thread &#x27;MH&#x27; via Django users
PS: I was just asking myself if I could somehow tell django what the 
hierarchy of views might be instead of defining the breadcrumbs for each 
view manually.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a0e67163-1228-4254-af7d-7d1d878461aa%40googlegroups.com.


How to generate breadcrums

2020-04-16 Thread &#x27;MH&#x27; via Django users
Hi there

I need some advice how to implement breadcrumbs in a base.html.

I have already installed django-bootstrap-breadcrumbs, registered it in the 
apps and so on. So far I would say, it's working,

Just for testing purposes it looks like this:
 
 {% load django_bootstrap_breadcrumbs %}
 {% block breadcrumbs %}
 {% clear_breadcrumbs %}
 {% breadcrumb "Home" "/" %}
 {% breadcrumb "Users and groups" "dummy" %}
 {% breadcrumb "tbd" "mockupview.index" %}
 {% endblock %}
 {% render_breadcrumbs %}
 


However, I would like to generate the breadcrumbs based on which view is 
extending the base.html file. And I do not know how to achieve that.

Do you have any advice for me?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2b3823c6-f8bc-4ff0-8ed1-0943e9ced832%40googlegroups.com.


How many apps do you serve with one gunicorn instance?

2020-04-14 Thread &#x27;MH&#x27; via Django users
This is not strictly related to the other question about third party app 
integration, but I also want to write another little, which does not 
necessarily has anything to do with the first two that I wrote. Therefore I 
was wondering if it would make more sense to start a new project for that 
or just to add it as a third app in the existing project.

In the latter case, I guess, the gunicorn that I use now, would serve all 
three. But perhaps it would be better to have multiple gunicorns running. I 
do not know.

What do you think?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fa6491a5-1dcc-49e0-92e7-b68455872dd0%40googlegroups.com.


Re: Using external libraries for analytics

2020-04-14 Thread &#x27;MH&#x27; via Django users
Thank you very much.

I will read about plotly (and dash just to see what that is :)).

Best regards

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43c3f5f4-4d79-4c1d-a5ca-b83d2f60d263%40googlegroups.com.


Using external libraries for analytics

2020-04-13 Thread &#x27;MH&#x27; via Django users
Hi

I wanted to create some kind of dashboard for myself. So I googled some 
applications of django for analytical dashboards and they proposed things 
like highcharts. From what I read I got the impression that I would use 
external sources and as if I would transmit data to other sites (e.g. 
https://www.highcharts.com/blog/tutorials/create-a-dashboard-using-highcharts-and-django/).
 
But perhaps I misunderstood that.

If you have any experience with libraries for the visualization of 
analytical data, what would you recommend that renders the data on premise?

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e995a9f3-0368-4081-9961-6c82d5822dc2%40googlegroups.com.


Re: Integrate a third pary app in Django and Gunicorn

2020-04-13 Thread &#x27;MH&#x27; via Django users
Friendly push :)



On Wednesday, April 8, 2020 at 6:09:21 PM UTC+2, MH wrote:
>
> Hi everyone
>
> I created two first, very small apps with Django and serve them on my NAS 
> with gunicorn and nginx as reverse proxy. That took me quite a while as I 
> am not an experienced coder or administrator. Now I successfully installed 
> Mayan EDMS which uses its own Python instance in an venv and uses its own 
> gunicorn. Well, that works, but I do not know if it is so clever or 
> recommendable to have to multiple Django and gunicorn instances running on 
> the same machine.
>
> What do you think about that?
>
> And is it possible to integrate a big app like Mayan EDMS in my existing 
> small Django/gunicorn environment? I always thought that Django could 
> easily take over one or another app just by copying the corresponding 
> folder and registering the app in the settings.py.
>
> Best regards
> MH
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/41cbfcf1-975b-47cb-b882-1b711b785794%40googlegroups.com.


Integrate a third pary app in Django and Gunicorn

2020-04-08 Thread &#x27;MH&#x27; via Django users
Hi everyone

I created two first, very small apps with Django and serve them on my NAS 
with gunicorn and nginx as reverse proxy. That took me quite a while as I 
am not an experienced coder or administrator. Now I successfully installed 
Mayan EDMS which uses its own Python instance in an venv and uses its own 
gunicorn. Well, that works, but I do not know if it is so clever or 
recommendable to have to multiple Django and gunicorn instances running on 
the same machine.

What do you think about that?

And is it possible to integrate a big app like Mayan EDMS in my existing 
small Django/gunicorn environment? I always thought that Django could 
easily take over one or another app just by copying the corresponding 
folder and registering the app in the settings.py.

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dc4b6325-c2ec-4bd7-b55f-a4d13696c92b%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-07 Thread &#x27;MH&#x27; via Django users
Dear Kasper

Thanks a lot. Yes, this has been too far away from django. But thanks 
nevertheless!

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b0aee411-c921-4bd9-8bbc-3ce86c692ad5%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
PS: The content of the last mentioned folder looks like this:

/usr/local/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.9.3$ 
ls *
crtbegin.o  crtbeginS.o  crtbeginT.o  crtend.o  crtendS.o  libgcc.a 
 libgcc_eh.a  libgcov.a

finclude:

include:
arm_acle.h  float.h   mmintrin.h  sanitizer  stdalign.h  stdatomic.h  stddef
.h  stdint-gcc.h  stdnoreturn.hunwind.h
arm_neon.h  iso646.h  omp.h   sspstdarg.hstdbool.hstdfix
.h  stdint.h  unwind-arm-common.h  varargs.h

include-fixed:
limits.h  README  syslimits.h

install-tools:
fixinc_list  gsyslimits.h  include  macro_list  mkheaders.conf

plugin:
gtype.state  include



-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f5b58170-f4ed-4589-9a42-7d4d651a36d1%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
Dear Kasper

Thank you very much. If you still read this, I would like to ask a question 
about cross compilation. I found this developers guide from Synology: 
https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_NAS_Server_3rd_Party_Apps_Integration_Guide.pdf

It starts very easy to follow and I followd the link to the github 
repository as mentioned on page 7. There I selected "Marvell Armada 370 
Linux 3.2.40" as this corresponds with my current linux version and the DS 
213j. However, I have problems with the following steps.

Page 11 shows how I should set environment variables. But not everything 
works.

The PDF says:

# env CC=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc 
\
LD=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ld \
RANLIB=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ranlib
 
\
CFLAGS="-I/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-
gnueabi/libc/include-mhard-float -mfpu=vfpv3-d16" \
LDFLAGS="-L/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-
gnueabi/libc/lib" \
./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux" \
--prefix=/usr/local


There are also further questions like "do I have to insert the 
backslashes?" but my more important question is around "how should I adapt 
these recommendations to my case?"

The toolchain that I extracted to /usr/local on my desktop PC has a 
different name. The folder is called "arm-unknown-linux-gnueabi". In the 
bin folder I can find many files starting with "arm-unknown-linux-gnueabi". 
There are also several gcc files. gcc itself, but also gcc-4.9.3, gcc-ar, 
gcc-nm, gcc-ranlib and there is a also a file which ends on -ld. 

However, there is no libc folder. When go back from the bin folder, then 
there is just "lib" and in it "gcc". Then there is another 
"arm-unknown-linux-gnueabi" folder and in it "4.9.3". But in there and in 
the following subfolders I cannot find a file called include-mhard-float

So, I do not even know what I am doing there, I am just trying to adapt 
this to the available files.

Could you point me in the right direction?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dae3cc3a-c6c0-4574-912a-6c8ea5a7832a%40googlegroups.com.


Re: django url resolver problem

2020-03-06 Thread &#x27;MH&#x27; via Django users
So, I would perhaps try something like 

url("^token/", TokenView.as_view(), name="token"),
url("^revoke_token/", RevokeTokenView.as_view(), name="revoke-token"),



-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b0c74ae4-8098-4cb4-99cc-3237955b41b8%40googlegroups.com.


Re: django url resolver problem

2020-03-06 Thread &#x27;MH&#x27; via Django users
Dear Ali

I am just new to this myself, but I think it comes to down to the question 
what is the first pattern that matches for django. As far as I know we can 
use the ^ in order to tell django/python that a pattern should be at the 
start of a string that is searched. So I am not mistaken, you could add 
that at the start and then it could work.

But here are other people with much more experience and I could be mistaken.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/88be3a2c-4368-4808-8f13-9480a2509950%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
No ... I cannot just copy it. Then it is asking for lxml again. 

ImportError: No module named 'lxml


-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/61923d9f-028e-4886-91c8-76fc02ae397f%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
 

>From both folders I tried ./python3 -m pip install docx, but both resulted 
in an error message. Nevertheless, I know that one of the two works with 
docx and runserver. So I guess, I installed it somehow in a different way 
and one of the python3s can use that.


Ha, so I found a package in 
/volume1/homes/admin/.local/lib/python3.8/site-packages/docx. As there is 
no other, I would say that however I got it there, this must be it. Could I 
just copy it to other site-packages folders?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/58944e39-7c5e-465f-bdeb-033854d57bd1%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
type -a python3
python3 is /opt/bin/python3
python3 is /usr/local/bin/python3

Can this actually be that a command leads to two binaries?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/493a5dfd-a827-4f77-b81f-0b95c446ed98%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
Hi Omar

Thanks for your help again. Indeed, runserver works depending on which 
python3 I am using. But I guess this is the problem. The python3 from 
/volume1/@appstore/py3k...and..so..on seems to work with gunicorn, but this 
is not the same python3 that works with docx. I still try to figure out 
which python3 on my system is invoked when I just enter python3.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7c8f9ad6-bc6a-46fd-913a-6e51273cecb7%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-06 Thread &#x27;MH&#x27; via Django users
Dear Kasper

Before I do something very difficult like this cross compiling I wanted to 
try to get gcc to run on the synology diskstation. But there is a general 
pip issue that I do not understand.

./pip3 search gcc
clang-fake-gcc (0.2.1)  - A GCC-like compiler interface, but runs 
Clang instead. Isn't that neat?
gcc7 (0.0.9)- GCC v7 binaries
Demangler (0.2) - A demangler package for gcc 3.x and gcc 
4.x
gccanalyze (0.1.2)  - Do static analysis with GCC.
gccoutputparser (0.1)   - Parses gcc/llvm output
gccinvocation (0.1) - Library for parsing GCC command-line 
options
scons-tool-gcccov (0.1.2)   - SCons support for gcc code coverage 
features
nim-install (0.5.0) - install nim compiler in Linux virtualenv 
assumes gcc
builddriver (0.8.0) - Execute make, cmake, maven and parses 
gcc/llvm output
bcx-basic-compile-tool (v 1.0)  - bcx basic gcc compile tool works with any 
ide
resolve-march-native (0.9.4)- Tool to determine what GCC flags 
-march=native would resolve into
cPrometheus (0.1)   - A monkey patch for prometheus_client, 
using GCC atomics for extra speed on CPython
ccsyspath (1.1.0)   - Find the system include paths for clang 
and gcc C/C++ compilers
fpvgcc (1.0.0)  - Analysing code footprint on embedded 
microcontrollers using GCC generated Map files
Cpyx (0.2.2.0)  - gcc/cython/distutils wrapper for 
compiling Cython and C code directly from python
minibuild (1.0.9)   - Build system aimed to be a pure Python 
alternative to GNU Make with builtin support of MSVS, GCC, clang


but  ...

./pip3 install gcc7
Defaulting to user installation because normal site-packages is not 
writeable
ERROR: Could not find a version that satisfies the requirement gcc7 (from 
versions: none)
ERROR: No matching distribution found for gcc7

I thougth that everything found by pip3 search should automatically be 
available, shouldn't it?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dabcc97a-c8d6-41d0-a695-cbaf94411093%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH&#x27; 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 scripts running 
that includes serving a document.

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/58291f33-6b97-4833-a060-76252c60d8c2%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH&#x27; 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 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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55570611-0818-4116-af80-dda72cc0f082%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH&#x27; 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.


What should I do?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9885c86-77d8-45d8-ad45-e2e3e4e30af0%40googlegroups.com.


Re: Unable to install / build docx module

2020-03-05 Thread &#x27;MH&#x27; 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

*
Could not find function xmlCheckVersion in library libxml2. Is libxml2 
installed?



-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f5fc3643-1b83-4b76-b311-d2ee2ffac113%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 different post.

But thanks for all so far!

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/adbc08e4-4c83-405f-9042-d38ba2a5%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f355d8d1-fe22-4adb-9915-8f16f52f5c8b%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0bfe682d-5dda-4f50-85bc-1239b17a82a3%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 get 
> used to them.
>
> https://docs.python.org/3/library/venv.html
>
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6c3a2e5f-a496-47e4-b216-94d8e651e029%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 worker with pid: 4483
[2020-03-05 15:55:51 +] [4483] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +] [4483] [INFO] Worker exiting (pid: 4483)
[2020-03-05 15:55:51 +] [4484] [INFO] Booting worker with pid: 4484
[2020-03-05 15:55:51 +] [4484] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +] [4484] [INFO] Worker exiting (pid: 4484)
[2020-03-05 15:55:51 +] [4486] [INFO] Booting worker with pid: 4486
[2020-03-05 15:55:51 +] [4486] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +] [4486] [INFO] Worker exiting (pid: 4486)
[2020-03-05 15:55:51 +] [4487] [INFO] Booting worker with pid: 4487
[2020-03-05 15:55:51 +] [4487] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +] [4487] [INFO] Worker exiting (pid: 4487)
[2020-03-05 15:55:51 +] [4472] [INFO] Shutting down: Master
[2020-03-05 15:55:51 +] [4472] [INFO] Reason: Worker failed to boot.



-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/32ff3661-129e-49df-8061-3ad51493951e%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 /volume1/@appstore/py3k/
usr/local/lib/python3.5/site-packages (from gunicorn) (41.0.1)

The output for this folder is identical for pip3 and pip 3.5.

/usr/bin$ ./pip install gunicorn
/usr/local/lib/python2.7/site-packages/cffi/model.py:526: UserWarning: 
'point_conversion_form_t' has no values explicitly defined; next version 
will refuse to guess which integer type it is meant to be (unsigned/signed, 
int/long)
  % self._get_c_name())
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
Please upgrade your Python as Python 2.7 is no longer maintained. A future 
version of pip will drop support for Python 2.7. More details about Python 2 
support in pip, can be found at https:
//pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not 
writeable
Collecting gunicorn
  Downloading gunicorn-19.10.0-py2.py3-none-any.whl (113 kB)
 || 113 kB 1.4 MB/s 
Installing collected packages: gunicorn
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] 
Permission denied: 
'/usr/local/lib/python2.7/site-packages/gunicorn-19.10.0.dist-info'
Check the permissions.

and as root:
/usr/bin# ./pip install gunicorn
/usr/local/lib/python2.7/site-packages/cffi/model.py:526: UserWarning: 
'point_conversion_form_t' has no values explicitly defined; next version 
will refuse to guess which integer type it is meant to be (unsigned/signed, 
int/long)
  % self._get_c_name())
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
Please upgrade your Python as Python 2.7 is no longer maintained. A future 
version of pip will drop support for Python 2.7. More details about Python 2 
support in pip, can be found at https:
//pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting gunicorn
  Downloading gunicorn-19.10.0-py2.py3-none-any.whl (113 kB)
 || 113 kB 1.4 MB/s 
Installing collected packages: gunicorn
Successfully installed gunicorn-19.10.0

I will now try it again.


-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/30b9b540-6224-4906-98f1-f0a3ff0ebb01%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 everywhere. (I would wish I just had one central 
apt-get command here)...

~/.local/bin$ ./pip3 install gunicorn
Defaulting to user installation because normal site-packages is not 
writeable
Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/
python3.8/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/homes/admin/.
local/lib/python3.8/site-packages (from gunicorn) (45.2.0)

and

~/.local/bin$ ./pip3.5 install gunicorn
Defaulting to user installation because normal site-packages is not 
writeable
Collecting gunicorn
  Using cached gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
Requirement already satisfied: setuptools>=3.0 in /volume1/@appstore/py3k/
usr/local/lib/python3.5/site-packages (from gunicorn) (41.0.1)
Installing collected packages: gunicorn
  WARNING: The script gunicorn is installed in 
'/var/services/homes/admin/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.
Successfully installed gunicorn-20.0.4

and

./pip3.8 install gunicorn
Defaulting to user installation because normal site-packages is not 
writeable
Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/
python3.8/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/homes/admin/.
local/lib/python3.8/site-packages (from gunicorn) (45.2.0)

and

./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.8/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/homes/admin/.
local/lib/python3.8/site-packages (from gunicorn) (45.2.0)

These were all from the same directory. Next post with more infos from 
other folders.




-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d9a4564c-08f7-48d8-ae5b-822656dc32b4%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 identified no issues (0 silenced).
March 05, 2020 - 14:42:06
Django version 3.0.3, using settings 'project.settings'
Starting development server at http://0:8000/
Quit the server with CONTROL-C.



-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/645cfdfa-1861-4ac8-97bf-c3be4c273196%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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 "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
 Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File 
"/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29309] [INFO] Worker exiting (pid: 29309)
[2020-03-05 12:55:09 +] [29310] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File 
"/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29310] [INFO] Worker exiting (pid: 29310)
[2020-03-05 12:55:10 +] [29297] [INFO] Shutting down: Master
[2020-03-05 12:55:10 +] [29297] [INFO] Reason: Worker failed to boot.

The wsgi filee only consists of:

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

application = get_wsgi_application()


What should I do differently?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d6ab1255-5fc0-4800-b618-555b34848422%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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] Using worker: sync
[2020-03-05 12:55:09 +] [29307] [INFO] Booting worker with pid: 29307
[2020-03-05 12:55:09 +] [29307] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File "/var/services/homes/admin/DjangoProject/project/project/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29307] [INFO] Worker exiting (pid: 29307)
[2020-03-05 12:55:09 +] [29308] [INFO] Booting worker with pid: 29308
[2020-03-05 12:55:09 +] [29308] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File "/var/services/homes/admin/DjangoProject/project/project/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29309] [INFO] Booting worker with pid: 29309
[2020-03-05 12:55:09 +] [29308] [INFO] Worker exiting (pid: 29308)
[2020-03-05 12:55:09 +] [29310] [INFO] Booting worker with pid: 29310
[2020-03-05 12:55:09 +] [29309] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File 
"/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29309] [INFO] Worker exiting (pid: 29309)
[2020-03-05 12:55:09 +] [29310] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File 
"/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29310] [INFO] Worker exiting (pid: 29310)
[2020-03-05 12:55:10 +] [29297] [INFO] Shutting down: Master
[2020-03-05 12:55:10 +] [29297] [INFO] Reason: Worker failed to boot.

The wsgi filee only consists of:

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

application = get_wsgi_application()


What should I do differently?

-- 
You received this message because you ar

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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] Using worker: sync
[2020-03-05 12:55:09 +] [29307] [INFO] Booting worker with pid: 29307
[2020-03-05 12:55:09 +] [29307] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File "/var/services/homes/admin/DjangoProject/project/project/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29307] [INFO] Worker exiting (pid: 29307)
[2020-03-05 12:55:09 +] [29308] [INFO] Booting worker with pid: 29308
[2020-03-05 12:55:09 +] [29308] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File "/var/services/homes/admin/DjangoProject/project/project/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29309] [INFO] Booting worker with pid: 29309
[2020-03-05 12:55:09 +] [29308] [INFO] Worker exiting (pid: 29308)
[2020-03-05 12:55:09 +] [29310] [INFO] Booting worker with pid: 29310
[2020-03-05 12:55:09 +] [29309] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File 
"/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29309] [INFO] Worker exiting (pid: 29309)
[2020-03-05 12:55:09 +] [29310] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in 
import_app
  File 
"/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", 
line 12, in 
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +] [29310] [INFO] Worker exiting (pid: 29310)
[2020-03-05 12:55:10 +] [29297] [INFO] Shutting down: Master
[2020-03-05 12:55:10 +] [29297] [INFO] Reason: Worker failed to boot.

The wsgi filee only consists of:

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

application = get_wsgi_application()


What should I do differently?

-- 
You received this message because you ar

Re: Stuck with Django on a Synology Diskstation

2020-03-05 Thread &#x27;MH&#x27; 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e4404c7e-e6d1-460d-9c22-e4571f1b7528%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-04 Thread &#x27;MH&#x27; 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 gunicorn 19.9.0
[2020-03-04 13:46:26 +] [28939] [INFO] Listening at: http://127.0.0.1:8000 
(28939)
[2020-03-04 13:46:26 +] [28939] [INFO] Using worker: sync
[2020-03-04 13:46:26 +] [28950] [INFO] Booting worker with pid: 28950
[2020-03-04 13:46:26 +] [28950] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in 
spawn_worker
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129
, in init_process
  File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138
, in load_wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in 
wsgi
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, 
in load
  File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, 
in load_wsgiapp
  File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 354, in 
import_app
ImportError: Failed to find application, did you mean 
'project/wsgi:application'?
[2020-03-04 13:46:26 +] [28950] [INFO] Worker exiting (pid: 28950)
[2020-03-04 13:46:26 +] [28939] [INFO] Shutting down: Master
[2020-03-04 13:46:26 +] [28939] [INFO] Reason: Worker failed to boot.

I just found this file in my project folder in a folder below the manage.py 
command. So therefore I thought that this could be the right wsgi file. I 
did not write anything into it.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2f03ec91-59e7-4060-bf53-78c4fb5d1d2b%40googlegroups.com.


Re: help with creating checkbox form

2020-03-03 Thread &#x27;MH&#x27; via Django users
Dear Tosin

In my html template I used 
{% csrf_token %}
{{ form.as_p }}
 

and in my views.py in the corresponding view I have a section where I check 
if the method is POST:
if request.method == 'POST':

Later I do this:
var_list_of_checked_boxes = request.POST.getlist('var_selection')


-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7f16fe5c-ea05--8225-b88cb5d54b3d%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread &#x27;MH&#x27; 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 that. So far I 
was happy with development version, but it seems difficult to install other 
things like mod-wsgi.

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/564baec6-a88e-4360-bb13-9518b1f40634%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread &#x27;MH&#x27; 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 entware/opkg 
installed. But since then I have problems with the installations of most 
packages there.

Here are the results of my adaption of your suggested commands:

/opt/bin# ./opkg find httpd
/opt/bin#

So, it seems there is no httpd24 on this repo.

/opt/bin# ./opkg install apache
Package apache (2.4.37-2) installed in root is up to date.

/opt/bin# ./opkg install gcc
Package gcc (7.4.0-5) installed in root is up to date.

/opt/bin# sudo python3.5 -m pip install mod-wsgi
Collecting mod-wsgi
  Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
ERROR: Command errored out with exit status 1:
 command: /usr/local/bin/python3.5 -c 'import sys, setuptools, 
tokenize; sys.argv[0] = 
'"'"'/tmp/pip-install-24inw61_/mod-wsgi/setup.py'"'"'; 
__file__='"'"'/tmp/pip-install-24inw61_/mod-wsgi/setup.py'"'"';f=getattr(tokenize,
 
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
egg_info --egg-base /tmp/pip-install-24inw61_/mod-wsgi/pip-egg-info
 cwd: /tmp/pip-install-24inw61_/mod-wsgi/
Complete output (5 lines):
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-install-24inw61_/mod-wsgi/setup.py", line 168, in 

'missing Apache httpd server packages.' % APXS)
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 Apache httpd server packages.

ERROR: Command errored out with exit status 1: python setup.py egg_info 
Check the logs for full command output.

I guess there are many problems, but this is just a start.

Best regards
MH


On Monday, March 2, 2020 at 9:04:23 PM UTC+1, MH wrote:
>
> 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. Obviously I should 
> make a change to a distinct webserver. Synology offers nginx and apache 
> 2.4. I installed both. And now I do not really know how to proceed. Out 
> there, there are many instructions to use something called mod-wsgi. But I 
> cannot install this from the package center of the Diskstation.
>
> I also tried to get opkg working. And this did not turn out so well, too. 
> Most packages return an error, when I try to install something. Before this 
> gets too elusive, I would ask you for guidance and then I can provide you 
> with the following error messages.
>
> Best regards
> MH
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ca388790-6dbf-448b-bde6-da14b055e9de%40googlegroups.com.


Re: help with creating checkbox form

2020-03-03 Thread &#x27;MH&#x27; via Django users
Hi

I got something like this to work with
var_selection = forms.MultipleChoiceField(required=False, widget=forms.
CheckboxSelectMultiple, choices=a_list_that_i_prepared_previously,)




On Tuesday, March 3, 2020 at 12:46:10 PM UTC+1, Tosin Ayoola wrote:
>
> Good day guyz, 
> i'm working on  a project that requires user making multiple selections 
> using checkbox after which these selected item get save to the database 
> after click on the on submit i've research on this and can't find any help, 
> i have it on html and javascript but i need the selected item saved to 
> database, can any one help me out, pls it urgent ?
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b97e1632-f041-4bb8-a501-d6001fff1edc%40googlegroups.com.


Django on Synoloy

2020-03-02 Thread &#x27;MH&#x27; via Django users
Dear all

I have a problem to get my django app from development to production stage 
on a Synology Diskstation. I installed apache 2.4, but I do not know how to 
proceed and I am always running into errors. Please give some guidance and 
I will add specific error messages.

Best regards
MH

PS: I did not find my previous post, so I wrote this again. In case, sorry 
for double posting.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2989925f-c121-4fb2-803a-51743dce99b7%40googlegroups.com.


Stuck with Django on a Synology Diskstation

2020-03-02 Thread &#x27;MH&#x27; 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. Obviously I should 
make a change to a distinct webserver. Synology offers nginx and apache 
2.4. I installed both. And now I do not really know how to proceed. Out 
there, there are many instructions to use something called mod-wsgi. But I 
cannot install this from the package center of the Diskstation.

I also tried to get opkg working. And this did not turn out so well, too. 
Most packages return an error, when I try to install something. Before this 
gets too elusive, I would ask you for guidance and then I can provide you 
with the following error messages.

Best regards
MH

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3b30b913-c881-451d-a25e-3539eaefa035%40googlegroups.com.