Re: What is different about "./manage.py shell" vs. normal Python shell that makes this list comprehension not work anymore?

2021-09-29 Thread Christian Seberino
Josue Thanks so much! That makes so much sense. I really appreciate it. Sincerely, Chris On Wed, Sep 29, 2021 at 5:27 PM Josué Alvarez wrote: > > Try with: > > *global allowed* > *allowed* = [e.service.name for e in aservs] > ... > servs = [a.service for a in appts if (a.service in *allo

Re: Basic questions about scaling a Django web app. (e.g. AppEngine solves all problems?)

2021-08-24 Thread Christian Seberino
Beautiful. Thanks. On Tue, Aug 24, 2021 at 2:51 AM Andréas Kühne wrote: > I would say that Google App Engine MIGHT solve some of your problems, but > you will instead get more problems. App Engine is a good solution, but > still is a big black box of functionality. > > I think you would be bet

Re: Basic questions about scaling a Django web app. (e.g. AppEngine solves all problems?)

2021-08-24 Thread Christian Seberino
Thanks. I'll check it out. On Tue, Aug 24, 2021 at 7:54 AM Robert Seghedi wrote: > Just go for Cloudflare Pages. It s much more easier > > În mar., 24 aug. 2021 la 04:30 cseb...@gmail.com a > scris: > >> I have a simple web app (bighelp.business). I anticipate >> the number of users to stea

Re: How remove "__all__" from the beginnings of form error messages?

2020-08-03 Thread Christian Seberino
I figured out the problem...If you only want the "global" errors to show up at the top of the form then you need to use {{form.non_field_errors}} instead of {{form.errors}}. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: How remove "__all__" from the beginnings of form error messages?

2020-08-03 Thread Christian Seberino
oba Thanks. Here are all the files you asked for... = forms.py: = class AppointmentForm(django.forms.Form): customer = django.forms.IntegerField() year

How remove "__all__" from the beginnings of form error messages?

2020-08-03 Thread Christian Seberino
I created a custom form error messag like so... raise django.forms.ValidationError("Invalid date") However, when I do {{form.errors}} in a template I see this __all__ - Invalid date - - - How remove that "__all__" part at beginning? - -- You received this

Re: Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-30 Thread Christian Seberino
coolguy Remember to include the csrf_token tag in all forms that are submitted via > POST. > Yes! It must be INSIDE the form element *not* outside! I'm so grateful for your help. All the Best, Chris -- You received this message because you are subscribed to the Google Groups "Django us

Re: Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-30 Thread Christian Seberino
Amitesh Indeed your suggestion below fixed everything. I can't thank you enough! cs On Wednesday, July 29, 2020 at 8:59:52 PM UTC-5, Amitesh Sahay wrote: > > Generally, {% csrf_token %} is written just below the opening tag. > I mean, not sure if this has anything to do with your issue. Other

Re: Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-29 Thread Christian Seberino
tten just below the opening tag. > I mean, not sure if this has anything to do with your issue. Others may > confirm as well > > Regards, > Amitesh > > > On Thursday, 30 July, 2020, 07:26:21 am IST, Christian Seberino < > cseber...@gmail.com> wrote: > > > He

Re: Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-29 Thread Christian Seberino
Here is my template... {% extends "html_base" %} {% block body_elements %} UPDATE STATUSES {% for e in both %}

Re: Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-29 Thread Christian Seberino
On Wednesday, July 29, 2020 at 5:29:53 PM UTC-5, coolguy wrote: > > Tired your link for the form. If this is the form you are concerned about > then the message that pops up is for validation i.e. form.is_valid(). > Did you see the CSRF error I got?. Here is a pic https://imgur.com/a/LIRBadQ

Re: Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-29 Thread Christian Seberino
Here is the problematic url... > https://grandmas4hire.com/admin_status/ > Just press submit button w/o doing anything else and you'll see -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving ema

Can't get rid of "CSRF verification failed. Request aborted.: when submit form with nothing selected

2020-07-29 Thread Christian Seberino
I have a Django app with multiple forms on various pages. They all work except for one with just an optional checkbox... I checked and they all have templates with {% csrf_token %}. The only thing special but the problematic form is that I have a checkbox input that is optional. That mean

Re: Why the next parameter does NOT show up in request object?

2019-11-01 Thread Christian Seberino
Andreas Thanks so much. This was very helpful. For what its worth, the keyword on the Form class seems to be "initial" rather than "initial_data" now. Thanks again! Awesome stuff! cs > def log_in(request): > if request.method == "POST": > form = pollster.forms.LogInFo

Why the next parameter does NOT show up in request object?

2019-11-01 Thread Christian Seberino
I can see the next parameter hanging off the URL of my log_in page. However, I cannot *read* it in my view code. The next parameter does NOT get passed to my Python code...Why not? Is my form action = "." the problem below? Here is the traceback. https://dpaste.de/H7KU Here is my log in

Re: Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-07 Thread Christian Seberino
OK I fixed. All my server code was correct but I was creating User objects incorrectly. You can create User objects in such a way that they are NOT utilized correctly by the authentication system! I was not using the User.objects.create_user method. Once I did that, it worked. Chris -- You re

Re: Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-07 Thread Christian Seberino
Thanks. I tried doing authenticate(request = request, username = username, password = password) and it still fails. Also, they mention the request parameter in Django docs but then the example does not have it See https://docs.djangoproject.com/en/2.2/topics/auth/default/#auth-web-request

Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-06 Thread Christian Seberino
Why would check_password(..) return True but authenticate(.., ..) never return user? See this session in a Django shell below... >>> u >>> u.username 'xx' >>> u.password 'pbkdf2_sha256$10$f3zIUwPXtnEM$zbQdcgPNgRi6CBPQu8wlRg4T7egH80S9bnL0FPunZRo=' >>> u.check_password("yy") True >>> djan

Cannot update file to a Django form

2019-02-23 Thread Christian Seberino
I can't seem to upload a file to a Django form. The form POST is never valid. Any ideas? Here is my code... def upload_file(request): if request.method == 'POST': form = tummytutoring.forms.UploadFileForm(request.POST, request.FILES) if form.is_valid(): open("FT

Re: trouble adding variables to URLs in templates... seems some characters get cut out like "?"

2018-08-02 Thread Christian Seberino
legroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *Christian > Seberino > *Sent:* Thursday, August 2, 2018 3:36 PM > *To:* Django users > *Subject:* trouble adding variables to URLs in templates... seems some > characters get cut out like "?" > >

trouble adding variables to URLs in templates... seems some characters get cut out like "?"

2018-08-02 Thread Christian Seberino
Suppose you have a URL built from a variable in a template like so...test. I noticed that parts of some_variable get cut out if they include certain characters. For example... "/search/?search=" seems to get replace with "/search/". What is the part after "?" cut off? (I have same problem eve