Re: Novice questions about Pagination syntax and classes in general

2019-06-01 Thread John Bagiliko
I will answer question two. I'm not sure I understand your question 1. The "objects" is query method of every Django model. You use it to query. Contacts should be in your models.py and you should import Contacts in your views.py before you can use it. On Sun, Jun 2, 2019, 1:08 AM drone4four

Atomic IntegerField increment based on another model instance

2019-06-01 Thread Ryan Causey
Assume the following models for this question: class Jurisdiction(models.Model): name = models.CharField(max_length = 100) class Account(models.Model): account_number = models.PositiveIntegerField(blank = True) jurisdiction = models.ForeignKey("Jurisdiction", on_delete = models.

Novice questions about Pagination syntax and classes in general

2019-06-01 Thread drone4four
As part of the official Django doc on Pagination , take a look at the listing function: def listing(request): contact_list = Contacts.objects.all() paginator = Paginator(contact_list, 25) # Show 25

Re: is that any way to deploy django in apache with centos

2019-06-01 Thread Ryan Nowakowski
Please post the specific error you're getting. On May 30, 2019 6:59:22 AM CDT, Kurosh Sol wrote: >is that any way to set Django in apache with wsgi mod in centos >I keep reading and still get error >any good resource can really work? > >-- >You received this message because you are subscribed

Re: Collectstable displays 0 static file copied issue

2019-06-01 Thread Chetan Ganji
I use below settings. For this to work you have to create 2 folders inside the folder where manage.py is located - "*static*" and "*media*". Use below settings and run the *collectstatic* command once again and see if it works for you. STATIC_URL = '/static/' MEDIA_URL = '/media/'

Re: Error while doing django tutorial part 2

2019-06-01 Thread rf
on last line your code is: return self.question_text it should be: return self.choice_text On Monday, September 10, 2018 at 3:17:08 AM UTC+4:30, Pravinkumar Kale wrote: > > > I am also getting same issue... > Following is my code > > ## > from django.db

password reset

2019-06-01 Thread ExplaineR KhaN
​ i handle password reset when i write this code can not me send email def send_mail(to, template, context): html_content = render_to_string(f'accounts/emails/{template}.html', context) text_content = render_to_string(f'accounts/emails/{template}.txt', context) msg =

Collectstable displays 0 static file copied issue

2019-06-01 Thread Ankhi Roy
Hey, So I have made the following changes and Django can now read static CSS file now there is no more 404 while loading the static css file. However, on the web browser, the output does not reflect css properties like header color or header alignment. I have run python3 manage.py

Possible bug [Was: jquery deployment]

2019-06-01 Thread Mike Dewhirst
On 31/05/2019 6:04 pm, Mike Dewhirst wrote: On 30/05/2019 8:22 pm, Mike Dewhirst wrote: I just encountered a weird UI glitch[1] in the Admin after upgrading to Django 2.2.1 I have now discovered the problem described earlier is more generic as follows: 1. For *any *ForeignKey or

Re: advantage of angular js with django??

2019-06-01 Thread Nick Sarbicki
> The biggest advantage is you can create, change or have multiple frontend systems on different platforms without having to make changes to your Django backend. For example you can create an AngularJS web app and a React Native app for iOS using the same Django backend. It's worth noting that