Re: HELP me: "a beginner's questions"

2021-08-19 Thread MR INDIA
First Take all the Deployment security checklist given here and then deploy, python3 manage.py runserver starts a *development *server *not* a *production* server you have to configure that on your own... On Wednesday, 18 August 2021 at 20:28:09 UTC+5:30 alex...@gmail.com wrote: > Hello, > > Th

loaddata - replace 'save' with 'bulk_create' with batch_size?

2021-08-19 Thread Daniel Edry
Hey, i was trying to upload about 500K results into my db with loaddata and saw that it saves the items one item at a time in "load_label" in line "obj.save(using=self.using)" is there a reason no the save the objects to a list and then run: bulk_create(objs, batch_size=bulk_size) (with may

Re: Python code changes are not reflecting on Django-based web server.

2021-08-19 Thread Ryan Nowakowski
I'd verify that the systemctl commands are actually starting and stopping httpd. Does the pid change? On August 18, 2021 11:04:07 AM CDT, Hasan Baig wrote: >Hi, > >I have been hosting a django-based web server (httpd with mod_wsgi package) on >Linux CentOS 7. I used to reflect the changes made

Re: View that displays my ManyToManyField('self'...) relations in a with levels

2021-08-19 Thread David Crandell
I would create two dictionaries, one for subassembly and one for component. then in your view, loop through the first group, pulling your data from a master dataset: assem = Assembly.objects.all() sa = assem.subassembly.all() comp = assem.component.all() send 'sa' and 'comp' to your template as

Re: Python code changes are not reflecting on Django-based web server.

2021-08-19 Thread Abeer Eltanawy
I have been using the apachectl command instead and it works without an issue. sudo apachectl stop sudo apachectl start sudo apachectl restart On Thu, Aug 19, 2021 at 2:54 PM Ryan Nowakowski wrote: > I'd verify that the systemctl commands are actually starting and stopping > httpd. Does the pid

Re: View that displays my ManyToManyField('self'...) relations in a with levels

2021-08-19 Thread Nader Elsisi
I noticed that subassembly 6 has different components in use. Is that what you want. On Wed, Aug 18, 2021, 10:57 AM M. GW wrote: > Hi, > > I am now trying, for days, to get a tree like view from my assembly model > into my template. I think I have read everything what I have found on > StackOver

how to solve several Foreign key relationship problem? Any help or advice?

2021-08-19 Thread Alexander Smolin
I'm currently learning Django and making electronic grade book. I am completely stuck after trying everything, but still cannot solve the problem. I will explain in detail and post all the relevant code below. I need to have two url pages "class_students" and "teacher_current". The first page

Re: View that displays my ManyToManyField('self'...) relations in a with levels

2021-08-19 Thread Marko
Hey, thank you. I tried your approach and is looks very promising but I am getting an error. Here is my view: *class AssemblyDetailView(LoginRequiredMixin, DetailView):* *model = Assembly* *template_name = "engineering/assembly/assembly_detail.html"* *assem = Assembly.objects.all()*

Re: View that displays my ManyToManyField('self'...) relations in a with levels

2021-08-19 Thread Marko
Yes, my example is not right. Both should be the same! nader...@gmail.com schrieb am Donnerstag, 19. August 2021 um 16:59:01 UTC+2: > I noticed that subassembly 6 has different components in use. Is that what > you want. > > On Wed, Aug 18, 2021, 10:57 AM M. GW wrote: > >> Hi, >> >> I am now tr

Re: Python code changes are not reflecting on Django-based web server.

2021-08-19 Thread Hasan Baig
Yes systemctl stop and start httpd, i verified by checking the web page. How can i check pid? Regards Hasan > On Aug 19, 2021, at 8:55 AM, Ryan Nowakowski wrote: > > I'd verify that the systemctl commands are actually starting and stopping > httpd. Does the pid change? > >> On August 18, 2