Re: Form Page URL Not Found

2023-05-01 Thread Michael Starr
Thanks, Albert!
Mike

On Monday, May 1, 2023 at 4:44:39 PM UTC-7 ALBERT ASHABA AHEEBWA wrote:

> Oh, just realized Dylan had already answered url bit 
>
>
>
>
> Best Regards,
>
> Albert Ashaba Aheebwa
> +256 781 435857 <+256%20781%20435857>
>
> On Tue, 2 May 2023, 02:41 ALBERT ASHABA AHEEBWA,  
> wrote:
>
>>
>> Hi Michael,
>>
>> On the issue, of urls, Django uses some kind of regex expression to know 
>> which view to render. And because it's python, it reads from top - bottom. 
>> So the two urls "pet/..." are colliding. Change one url to confirm the 
>> suspicions.
>>
>> On your query of when to Use FormView or CreateView, if you need to save 
>> data to the database, always use CreateView. But if all you need is capture 
>> data and do something with it, like send an email, then FormView is for 
>> you.. Or a normal FBV can work too 
>>
>>
>> Best Regards,
>>
>> Albert
>>
>> On Tue, 2 May 2023, 02:21 Michael Starr,  wrote:
>>
>>> I made some progress on the error.
>>> It's a view error. It's thrown by PetDetailView (which isn't even being 
>>> called with this url call or this template), and it can't find the context 
>>> object name that I defined as pet, which is stupid, because I defined it, 
>>> it's not a memory lookup.
>>> QED Django is bad.
>>>
>>> Mike
>>>
>>> On Sunday, April 30, 2023 at 1:43:02 PM UTC-7 Michael Starr wrote:
>>>
 Hi Alberta. Thank you for the wonderful resource. I like concise 
 information displays.

 Can you explain, by any chance, when a FormView and when a CreateView 
 are used? The tutorials also say use CreateView, but I went for what was 
 more logical to me--and it didn't work. But that may not have been the 
 reason it didn't work. The docstring for the CreateView is a little 
 ambiguous. To put it here, " View for creating a new object, with a 
 response rendered by a template." What do they mean by new object? 
 Whereas for FormView, it is clear: " A view for displaying a form and 
 rendering a template response." This seems more appropriate.

 The {{ form }} is polish on the nail. I need my URL to be found first.

 But thank you for the tangential improvements.

 Michael

 On Sunday, April 30, 2023 at 12:27:00 AM UTC-7 ALBERT ASHABA AHEEBWA 
 wrote:

> Hi there,
> Yes you need to add {{form}} to your html. I didn't see your models.py 
> file, but let's assume that's okay too.
>
> If you are going to use cbv(class based views), The upload view should 
> inherit from the CreateView. Try this amazing resource to learn more,
>
> https://ccbv.co.uk/
>
> And also don't forget to add the form attr 
> enctype='multipart/form-data' since it's a file upload field. 
>
>
>
> Best Regards,
>
> Albert Ashaba Aheebwa
> +256 781 435857 <+256%20781%20435857>
>
> On Sun, 30 Apr 2023, 05:20 Michael Starr,  
> wrote:
>
>> To contribute to my own answer, but not to answer the question:
>> I forgot that Django can automatically render HTML forms using the 
>> tagging language.
>>
>> From the Django Docs 
>> https://docs.djangoproject.com/en/4.1/topics/forms/()
>> *The template¶ 
>> * 
>>
>> *We don’t need to do much in our name.html template:*
>> * {% csrf_token %} {{ form 
>> }}   *
>>
>> *All the form’s fields and their attributes will be unpacked into 
>> HTML markup from that {{ form }} by Django’s template language.*
>> I will use this to update my template context. But I don't think this 
>> is the cause of the url routing error.
>> Michael
>> On Saturday, April 29, 2023 at 6:27:33 PM UTC-7 Michael Starr wrote:
>>
>>> This isn't the exact name of the error; I'm sure you all have 
>>> encountered the bad URL error before. But, it tells me it can't find 
>>> the 
>>> pet matching the query (I'm making a pet website), and it checked the 
>>> urls 
>>> in the order listed below. I mean, you know, in the order in the 
>>> urls.py 
>>> file.
>>>
>>> Another url works from the project urls.py file, but this url is in 
>>> the app urls.py file. But it does check the imported urls.
>>>
>>> This url should be routing to a form template which is connected to 
>>> a form view to update a photo object in my models.
>>>
>>> I'm not sure which files would be relevant to share. Here are the 
>>> ones I'm guessing may help:
>>>
>>> project urls.py
>>> from django.contrib import admin
>>> from django.urls import path, include
>>> from . import views
>>> from django.conf.urls.static import static
>>> from django.conf import settings
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('home/', views.HomeView.as_view(), name='home_view'),
>>> 

Re: Form Page URL Not Found

2023-05-01 Thread ALBERT ASHABA AHEEBWA
Oh, just realized Dylan had already answered url bit



Best Regards,

Albert Ashaba Aheebwa
+256 781 435857

On Tue, 2 May 2023, 02:41 ALBERT ASHABA AHEEBWA, <
ashabaaheebwaalb...@gmail.com> wrote:

>
> Hi Michael,
>
> On the issue, of urls, Django uses some kind of regex expression to know
> which view to render. And because it's python, it reads from top - bottom.
> So the two urls "pet/..." are colliding. Change one url to confirm the
> suspicions.
>
> On your query of when to Use FormView or CreateView, if you need to save
> data to the database, always use CreateView. But if all you need is capture
> data and do something with it, like send an email, then FormView is for
> you.. Or a normal FBV can work too
>
>
> Best Regards,
>
> Albert
>
> On Tue, 2 May 2023, 02:21 Michael Starr, 
> wrote:
>
>> I made some progress on the error.
>> It's a view error. It's thrown by PetDetailView (which isn't even being
>> called with this url call or this template), and it can't find the context
>> object name that I defined as pet, which is stupid, because I defined it,
>> it's not a memory lookup.
>> QED Django is bad.
>>
>> Mike
>>
>> On Sunday, April 30, 2023 at 1:43:02 PM UTC-7 Michael Starr wrote:
>>
>>> Hi Alberta. Thank you for the wonderful resource. I like concise
>>> information displays.
>>>
>>> Can you explain, by any chance, when a FormView and when a CreateView
>>> are used? The tutorials also say use CreateView, but I went for what was
>>> more logical to me--and it didn't work. But that may not have been the
>>> reason it didn't work. The docstring for the CreateView is a little
>>> ambiguous. To put it here, " View for creating a new object, with a
>>> response rendered by a template." What do they mean by new object?
>>> Whereas for FormView, it is clear: " A view for displaying a form and
>>> rendering a template response." This seems more appropriate.
>>>
>>> The {{ form }} is polish on the nail. I need my URL to be found first.
>>>
>>> But thank you for the tangential improvements.
>>>
>>> Michael
>>>
>>> On Sunday, April 30, 2023 at 12:27:00 AM UTC-7 ALBERT ASHABA AHEEBWA
>>> wrote:
>>>
 Hi there,
 Yes you need to add {{form}} to your html. I didn't see your models.py
 file, but let's assume that's okay too.

 If you are going to use cbv(class based views), The upload view should
 inherit from the CreateView. Try this amazing resource to learn more,

 https://ccbv.co.uk/

 And also don't forget to add the form attr
 enctype='multipart/form-data' since it's a file upload field.



 Best Regards,

 Albert Ashaba Aheebwa
 +256 781 435857 <+256%20781%20435857>

 On Sun, 30 Apr 2023, 05:20 Michael Starr, 
 wrote:

> To contribute to my own answer, but not to answer the question:
> I forgot that Django can automatically render HTML forms using the
> tagging language.
>
> From the Django Docs
> https://docs.djangoproject.com/en/4.1/topics/forms/()
> *The template¶
> *
>
> *We don’t need to do much in our name.html template:*
> * {% csrf_token %} {{ form }}
>   *
>
> *All the form’s fields and their attributes will be unpacked into HTML
> markup from that {{ form }} by Django’s template language.*
> I will use this to update my template context. But I don't think this
> is the cause of the url routing error.
> Michael
> On Saturday, April 29, 2023 at 6:27:33 PM UTC-7 Michael Starr wrote:
>
>> This isn't the exact name of the error; I'm sure you all have
>> encountered the bad URL error before. But, it tells me it can't find the
>> pet matching the query (I'm making a pet website), and it checked the 
>> urls
>> in the order listed below. I mean, you know, in the order in the urls.py
>> file.
>>
>> Another url works from the project urls.py file, but this url is in
>> the app urls.py file. But it does check the imported urls.
>>
>> This url should be routing to a form template which is connected to a
>> form view to update a photo object in my models.
>>
>> I'm not sure which files would be relevant to share. Here are the
>> ones I'm guessing may help:
>>
>> project urls.py
>> from django.contrib import admin
>> from django.urls import path, include
>> from . import views
>> from django.conf.urls.static import static
>> from django.conf import settings
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('home/', views.HomeView.as_view(), name='home_view'),
>> path('', include('pet_profile.urls')),
>> ]
>>
>> app urls.py
>> from django.contrib import admin
>> from django.urls import path
>> from pet_profile import views
>>
>> urlpatterns = [
>> path("pet//", views.PetDetailView.as_view(), name =

Re: Form Page URL Not Found

2023-05-01 Thread ALBERT ASHABA AHEEBWA
Hi Michael,

On the issue, of urls, Django uses some kind of regex expression to know
which view to render. And because it's python, it reads from top - bottom.
So the two urls "pet/..." are colliding. Change one url to confirm the
suspicions.

On your query of when to Use FormView or CreateView, if you need to save
data to the database, always use CreateView. But if all you need is capture
data and do something with it, like send an email, then FormView is for
you.. Or a normal FBV can work too


Best Regards,

Albert

On Tue, 2 May 2023, 02:21 Michael Starr, 
wrote:

> I made some progress on the error.
> It's a view error. It's thrown by PetDetailView (which isn't even being
> called with this url call or this template), and it can't find the context
> object name that I defined as pet, which is stupid, because I defined it,
> it's not a memory lookup.
> QED Django is bad.
>
> Mike
>
> On Sunday, April 30, 2023 at 1:43:02 PM UTC-7 Michael Starr wrote:
>
>> Hi Alberta. Thank you for the wonderful resource. I like concise
>> information displays.
>>
>> Can you explain, by any chance, when a FormView and when a CreateView are
>> used? The tutorials also say use CreateView, but I went for what was more
>> logical to me--and it didn't work. But that may not have been the reason it
>> didn't work. The docstring for the CreateView is a little ambiguous. To put
>> it here, " View for creating a new object, with a response rendered by a
>> template." What do they mean by new object? Whereas for FormView, it is
>> clear: " A view for displaying a form and rendering a template response."
>> This seems more appropriate.
>>
>> The {{ form }} is polish on the nail. I need my URL to be found first.
>>
>> But thank you for the tangential improvements.
>>
>> Michael
>>
>> On Sunday, April 30, 2023 at 12:27:00 AM UTC-7 ALBERT ASHABA AHEEBWA
>> wrote:
>>
>>> Hi there,
>>> Yes you need to add {{form}} to your html. I didn't see your models.py
>>> file, but let's assume that's okay too.
>>>
>>> If you are going to use cbv(class based views), The upload view should
>>> inherit from the CreateView. Try this amazing resource to learn more,
>>>
>>> https://ccbv.co.uk/
>>>
>>> And also don't forget to add the form attr enctype='multipart/form-data'
>>> since it's a file upload field.
>>>
>>>
>>>
>>> Best Regards,
>>>
>>> Albert Ashaba Aheebwa
>>> +256 781 435857 <+256%20781%20435857>
>>>
>>> On Sun, 30 Apr 2023, 05:20 Michael Starr, 
>>> wrote:
>>>
 To contribute to my own answer, but not to answer the question:
 I forgot that Django can automatically render HTML forms using the
 tagging language.

 From the Django Docs
 https://docs.djangoproject.com/en/4.1/topics/forms/()
 *The template¶
 *

 *We don’t need to do much in our name.html template:*
 * {% csrf_token %} {{ form }}
   *

 *All the form’s fields and their attributes will be unpacked into HTML
 markup from that {{ form }} by Django’s template language.*
 I will use this to update my template context. But I don't think this
 is the cause of the url routing error.
 Michael
 On Saturday, April 29, 2023 at 6:27:33 PM UTC-7 Michael Starr wrote:

> This isn't the exact name of the error; I'm sure you all have
> encountered the bad URL error before. But, it tells me it can't find the
> pet matching the query (I'm making a pet website), and it checked the urls
> in the order listed below. I mean, you know, in the order in the urls.py
> file.
>
> Another url works from the project urls.py file, but this url is in
> the app urls.py file. But it does check the imported urls.
>
> This url should be routing to a form template which is connected to a
> form view to update a photo object in my models.
>
> I'm not sure which files would be relevant to share. Here are the ones
> I'm guessing may help:
>
> project urls.py
> from django.contrib import admin
> from django.urls import path, include
> from . import views
> from django.conf.urls.static import static
> from django.conf import settings
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('home/', views.HomeView.as_view(), name='home_view'),
> path('', include('pet_profile.urls')),
> ]
>
> app urls.py
> from django.contrib import admin
> from django.urls import path
> from pet_profile import views
>
> urlpatterns = [
> path("pet//", views.PetDetailView.as_view(), name =
> "pet_profile"),
> path("owner//", views.PetOwnerDetailView.as_view(),
> name = "owner_profile"),
> path("pet/photoupload/", views.PetPhotoUploadView.as_view(), name
> = "photo_upload"),
> ]
> url in question is the bottom one (photo_upload)
>
> template (photo_upload.html)
> 
> 
> 
>
>  

Re: Form Page URL Not Found

2023-05-01 Thread Michael Starr
Man that one always gets me. I forget, often, that computers are simple 
automatons that obey logical rules.

Thank you, good sir.

Michael

On Monday, May 1, 2023 at 4:26:04 PM UTC-7 Dylan Reinhold wrote:

> Ill bite.
>
> urlpatterns = [
> path("pet//", views.PetDetailView.as_view(), name = 
> "pet_profile"),
> path("owner//", views.PetOwnerDetailView.as_view(), name = 
> "owner_profile"),
> path("pet/photoupload/", views.PetPhotoUploadView.as_view(), name = 
> "photo_upload"),
> ]
>
> You if you are going to url /pet/photoupload/ that is going to call the 
> first one and process "photoupload" as the slug.
> Move the photoupload above the the wildcard  entry.
>
> Dylan
>
> On Mon, May 1, 2023 at 4:21 PM Michael Starr  
> wrote:
>
>> I made some progress on the error.
>> It's a view error. It's thrown by PetDetailView (which isn't even being 
>> called with this url call or this template), and it can't find the context 
>> object name that I defined as pet, which is stupid, because I defined it, 
>> it's not a memory lookup.
>> QED Django is bad.
>>
>> Mike
>>
>> On Sunday, April 30, 2023 at 1:43:02 PM UTC-7 Michael Starr wrote:
>>
>>> Hi Alberta. Thank you for the wonderful resource. I like concise 
>>> information displays.
>>>
>>> Can you explain, by any chance, when a FormView and when a CreateView 
>>> are used? The tutorials also say use CreateView, but I went for what was 
>>> more logical to me--and it didn't work. But that may not have been the 
>>> reason it didn't work. The docstring for the CreateView is a little 
>>> ambiguous. To put it here, " View for creating a new object, with a 
>>> response rendered by a template." What do they mean by new object? 
>>> Whereas for FormView, it is clear: " A view for displaying a form and 
>>> rendering a template response." This seems more appropriate.
>>>
>>> The {{ form }} is polish on the nail. I need my URL to be found first.
>>>
>>> But thank you for the tangential improvements.
>>>
>>> Michael
>>>
>>> On Sunday, April 30, 2023 at 12:27:00 AM UTC-7 ALBERT ASHABA AHEEBWA 
>>> wrote:
>>>
 Hi there,
 Yes you need to add {{form}} to your html. I didn't see your models.py 
 file, but let's assume that's okay too.

 If you are going to use cbv(class based views), The upload view should 
 inherit from the CreateView. Try this amazing resource to learn more,

 https://ccbv.co.uk/

 And also don't forget to add the form attr 
 enctype='multipart/form-data' since it's a file upload field. 



 Best Regards,

 Albert Ashaba Aheebwa
 +256 781 435857 <+256%20781%20435857>

 On Sun, 30 Apr 2023, 05:20 Michael Starr,  
 wrote:

> To contribute to my own answer, but not to answer the question:
> I forgot that Django can automatically render HTML forms using the 
> tagging language.
>
> From the Django Docs 
> https://docs.djangoproject.com/en/4.1/topics/forms/()
> *The template¶ 
> * 
>
> *We don’t need to do much in our name.html template:*
> * {% csrf_token %} {{ form }} 
>   *
>
> *All the form’s fields and their attributes will be unpacked into HTML 
> markup from that {{ form }} by Django’s template language.*
> I will use this to update my template context. But I don't think this 
> is the cause of the url routing error.
> Michael
> On Saturday, April 29, 2023 at 6:27:33 PM UTC-7 Michael Starr wrote:
>
>> This isn't the exact name of the error; I'm sure you all have 
>> encountered the bad URL error before. But, it tells me it can't find the 
>> pet matching the query (I'm making a pet website), and it checked the 
>> urls 
>> in the order listed below. I mean, you know, in the order in the urls.py 
>> file.
>>
>> Another url works from the project urls.py file, but this url is in 
>> the app urls.py file. But it does check the imported urls.
>>
>> This url should be routing to a form template which is connected to a 
>> form view to update a photo object in my models.
>>
>> I'm not sure which files would be relevant to share. Here are the 
>> ones I'm guessing may help:
>>
>> project urls.py
>> from django.contrib import admin
>> from django.urls import path, include
>> from . import views
>> from django.conf.urls.static import static
>> from django.conf import settings
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('home/', views.HomeView.as_view(), name='home_view'),
>> path('', include('pet_profile.urls')),
>> ]
>>
>> app urls.py
>> from django.contrib import admin
>> from django.urls import path
>> from pet_profile import views
>>
>> urlpatterns = [
>> path("pet//", views.PetDetailView.as_view(), name = 
>> "pet_profile"),
>>  

Re: Form Page URL Not Found

2023-05-01 Thread Dylan Reinhold
Ill bite.

urlpatterns = [
path("pet//", views.PetDetailView.as_view(), name =
"pet_profile"),
path("owner//", views.PetOwnerDetailView.as_view(), name =
"owner_profile"),
path("pet/photoupload/", views.PetPhotoUploadView.as_view(), name =
"photo_upload"),
]

You if you are going to url /pet/photoupload/ that is going to call the
first one and process "photoupload" as the slug.
Move the photoupload above the the wildcard  entry.

Dylan

On Mon, May 1, 2023 at 4:21 PM Michael Starr 
wrote:

> I made some progress on the error.
> It's a view error. It's thrown by PetDetailView (which isn't even being
> called with this url call or this template), and it can't find the context
> object name that I defined as pet, which is stupid, because I defined it,
> it's not a memory lookup.
> QED Django is bad.
>
> Mike
>
> On Sunday, April 30, 2023 at 1:43:02 PM UTC-7 Michael Starr wrote:
>
>> Hi Alberta. Thank you for the wonderful resource. I like concise
>> information displays.
>>
>> Can you explain, by any chance, when a FormView and when a CreateView are
>> used? The tutorials also say use CreateView, but I went for what was more
>> logical to me--and it didn't work. But that may not have been the reason it
>> didn't work. The docstring for the CreateView is a little ambiguous. To put
>> it here, " View for creating a new object, with a response rendered by a
>> template." What do they mean by new object? Whereas for FormView, it is
>> clear: " A view for displaying a form and rendering a template response."
>> This seems more appropriate.
>>
>> The {{ form }} is polish on the nail. I need my URL to be found first.
>>
>> But thank you for the tangential improvements.
>>
>> Michael
>>
>> On Sunday, April 30, 2023 at 12:27:00 AM UTC-7 ALBERT ASHABA AHEEBWA
>> wrote:
>>
>>> Hi there,
>>> Yes you need to add {{form}} to your html. I didn't see your models.py
>>> file, but let's assume that's okay too.
>>>
>>> If you are going to use cbv(class based views), The upload view should
>>> inherit from the CreateView. Try this amazing resource to learn more,
>>>
>>> https://ccbv.co.uk/
>>>
>>> And also don't forget to add the form attr enctype='multipart/form-data'
>>> since it's a file upload field.
>>>
>>>
>>>
>>> Best Regards,
>>>
>>> Albert Ashaba Aheebwa
>>> +256 781 435857 <+256%20781%20435857>
>>>
>>> On Sun, 30 Apr 2023, 05:20 Michael Starr, 
>>> wrote:
>>>
 To contribute to my own answer, but not to answer the question:
 I forgot that Django can automatically render HTML forms using the
 tagging language.

 From the Django Docs
 https://docs.djangoproject.com/en/4.1/topics/forms/()
 *The template¶
 *

 *We don’t need to do much in our name.html template:*
 * {% csrf_token %} {{ form }}
   *

 *All the form’s fields and their attributes will be unpacked into HTML
 markup from that {{ form }} by Django’s template language.*
 I will use this to update my template context. But I don't think this
 is the cause of the url routing error.
 Michael
 On Saturday, April 29, 2023 at 6:27:33 PM UTC-7 Michael Starr wrote:

> This isn't the exact name of the error; I'm sure you all have
> encountered the bad URL error before. But, it tells me it can't find the
> pet matching the query (I'm making a pet website), and it checked the urls
> in the order listed below. I mean, you know, in the order in the urls.py
> file.
>
> Another url works from the project urls.py file, but this url is in
> the app urls.py file. But it does check the imported urls.
>
> This url should be routing to a form template which is connected to a
> form view to update a photo object in my models.
>
> I'm not sure which files would be relevant to share. Here are the ones
> I'm guessing may help:
>
> project urls.py
> from django.contrib import admin
> from django.urls import path, include
> from . import views
> from django.conf.urls.static import static
> from django.conf import settings
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('home/', views.HomeView.as_view(), name='home_view'),
> path('', include('pet_profile.urls')),
> ]
>
> app urls.py
> from django.contrib import admin
> from django.urls import path
> from pet_profile import views
>
> urlpatterns = [
> path("pet//", views.PetDetailView.as_view(), name =
> "pet_profile"),
> path("owner//", views.PetOwnerDetailView.as_view(),
> name = "owner_profile"),
> path("pet/photoupload/", views.PetPhotoUploadView.as_view(), name
> = "photo_upload"),
> ]
> url in question is the bottom one (photo_upload)
>
> template (photo_upload.html)
> 
> 
> 
>
> 
> 
> Upload a photo of your pet:  label>

Re: Form Page URL Not Found

2023-05-01 Thread Michael Starr
I made some progress on the error.
It's a view error. It's thrown by PetDetailView (which isn't even being 
called with this url call or this template), and it can't find the context 
object name that I defined as pet, which is stupid, because I defined it, 
it's not a memory lookup.
QED Django is bad.

Mike

On Sunday, April 30, 2023 at 1:43:02 PM UTC-7 Michael Starr wrote:

> Hi Alberta. Thank you for the wonderful resource. I like concise 
> information displays.
>
> Can you explain, by any chance, when a FormView and when a CreateView are 
> used? The tutorials also say use CreateView, but I went for what was more 
> logical to me--and it didn't work. But that may not have been the reason it 
> didn't work. The docstring for the CreateView is a little ambiguous. To put 
> it here, " View for creating a new object, with a response rendered by a 
> template." What do they mean by new object? Whereas for FormView, it is 
> clear: " A view for displaying a form and rendering a template response." 
> This seems more appropriate.
>
> The {{ form }} is polish on the nail. I need my URL to be found first.
>
> But thank you for the tangential improvements.
>
> Michael
>
> On Sunday, April 30, 2023 at 12:27:00 AM UTC-7 ALBERT ASHABA AHEEBWA wrote:
>
>> Hi there,
>> Yes you need to add {{form}} to your html. I didn't see your models.py 
>> file, but let's assume that's okay too.
>>
>> If you are going to use cbv(class based views), The upload view should 
>> inherit from the CreateView. Try this amazing resource to learn more,
>>
>> https://ccbv.co.uk/
>>
>> And also don't forget to add the form attr enctype='multipart/form-data' 
>> since it's a file upload field. 
>>
>>
>>
>> Best Regards,
>>
>> Albert Ashaba Aheebwa
>> +256 781 435857 <+256%20781%20435857>
>>
>> On Sun, 30 Apr 2023, 05:20 Michael Starr,  wrote:
>>
>>> To contribute to my own answer, but not to answer the question:
>>> I forgot that Django can automatically render HTML forms using the 
>>> tagging language.
>>>
>>> From the Django Docs 
>>> https://docs.djangoproject.com/en/4.1/topics/forms/()
>>> *The template¶ 
>>> * 
>>>
>>> *We don’t need to do much in our name.html template:*
>>> * {% csrf_token %} {{ form }} 
>>>   *
>>>
>>> *All the form’s fields and their attributes will be unpacked into HTML 
>>> markup from that {{ form }} by Django’s template language.*
>>> I will use this to update my template context. But I don't think this is 
>>> the cause of the url routing error.
>>> Michael
>>> On Saturday, April 29, 2023 at 6:27:33 PM UTC-7 Michael Starr wrote:
>>>
 This isn't the exact name of the error; I'm sure you all have 
 encountered the bad URL error before. But, it tells me it can't find the 
 pet matching the query (I'm making a pet website), and it checked the urls 
 in the order listed below. I mean, you know, in the order in the urls.py 
 file.

 Another url works from the project urls.py file, but this url is in the 
 app urls.py file. But it does check the imported urls.

 This url should be routing to a form template which is connected to a 
 form view to update a photo object in my models.

 I'm not sure which files would be relevant to share. Here are the ones 
 I'm guessing may help:

 project urls.py
 from django.contrib import admin
 from django.urls import path, include
 from . import views
 from django.conf.urls.static import static
 from django.conf import settings

 urlpatterns = [
 path('admin/', admin.site.urls),
 path('home/', views.HomeView.as_view(), name='home_view'),
 path('', include('pet_profile.urls')),
 ]

 app urls.py
 from django.contrib import admin
 from django.urls import path
 from pet_profile import views

 urlpatterns = [
 path("pet//", views.PetDetailView.as_view(), name = 
 "pet_profile"),
 path("owner//", views.PetOwnerDetailView.as_view(), 
 name = "owner_profile"),
 path("pet/photoupload/", views.PetPhotoUploadView.as_view(), name = 
 "photo_upload"),
 ]
 url in question is the bottom one (photo_upload)

 template (photo_upload.html)
 
 
 

 
 
 Upload a photo of your pet: >>> >
 
 

 app views
 from django.shortcuts import render
 from django.views.generic import (ListView,
   DetailView, FormView)
 from pet_profile.models import PetOwner, Pet, PetPhoto, PetStory
 from pet_profile.forms import PhotoUploadForm

 class PetOwnerListView(ListView):
 model = PetOwner
 context_object_name = "owner_list"
 template_name = "home.html"

 
 # def all_pet_photos(request):
 # pets = Pet.objects.all()
 # pet_data = {}
 # for pet in pets:
 # 

Re: Unpaid Internship

2023-05-01 Thread Habeeb Lasisi
Thanks

On Mon, May 1, 2023, 5:46 PM Ben Indangasy  wrote:

> Beninda Group Ltd needs some interns - i...@beninda.com
>
> On Mon, May 1, 2023, 12:43 AM Each1Teach1 Tech Inc <
> pcintegral.pcintegr...@gmail.com> wrote:
>
>> let's talk
>>
>>
>> On Monday, April 24, 2023, John Diginee  wrote:
>>
>>> Dear Sir/Ma'am,
>>>
>>> I hope this message finds you well. I am a full-stack software
>>> engineering student at Holberton School, a Silicon Valley-based software
>>> engineering institution. I am reaching out to express my interest in an
>>> unpaid backend intern or junior role at your esteemed company.
>>>
>>> My primary goal is to learn from your inspiring and experienced
>>> developers and gain practical, real-world experience. I am not particularly
>>> concerned about financial compensation at this time.
>>>
>>> I understand that my request may seem unconventional, but I would be
>>> grateful for any opportunity to work with your company. I am a hardworking,
>>> persistent, determined, resilient, and fast-learning individual, and I am
>>> confident that I can contribute positively to your team.
>>>
>>> Here's my LinkedIn and GitHub profile for your review:
>>> https://www.linkedin.com/in/johndiginee/
>>> https://github.com/johndiginee
>>>
>>>  Thank you for your precious time and consideration. I look forward to
>>> hearing from you.
>>>
>>> --
>>> 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/d0247416-15e7-42c2-bf56-54ef95bb6733n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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/CA%2BGDpiT2_qJGwRG658L6XxjWSP-xChCgO2nMgGVuTf9oXLbhPg%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAKHEhDK4ve78BOAnusZvs7XGG6MiqfjrxHyVmt%3DdgsKRnXtDnQ%40mail.gmail.com
> 
> .
>

-- 
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/CAE%2BgYmg29UyoP92WavAOp15-nHAuiwt8_85%2B3Yo8yKzH5Jvsqw%40mail.gmail.com.


Re: Unpaid Internship

2023-05-01 Thread Ben Indangasy
Beninda Group Ltd needs some interns - i...@beninda.com

On Mon, May 1, 2023, 12:43 AM Each1Teach1 Tech Inc <
pcintegral.pcintegr...@gmail.com> wrote:

> let's talk
>
>
> On Monday, April 24, 2023, John Diginee  wrote:
>
>> Dear Sir/Ma'am,
>>
>> I hope this message finds you well. I am a full-stack software
>> engineering student at Holberton School, a Silicon Valley-based software
>> engineering institution. I am reaching out to express my interest in an
>> unpaid backend intern or junior role at your esteemed company.
>>
>> My primary goal is to learn from your inspiring and experienced
>> developers and gain practical, real-world experience. I am not particularly
>> concerned about financial compensation at this time.
>>
>> I understand that my request may seem unconventional, but I would be
>> grateful for any opportunity to work with your company. I am a hardworking,
>> persistent, determined, resilient, and fast-learning individual, and I am
>> confident that I can contribute positively to your team.
>>
>> Here's my LinkedIn and GitHub profile for your review:
>> https://www.linkedin.com/in/johndiginee/
>> https://github.com/johndiginee
>>
>>  Thank you for your precious time and consideration. I look forward to
>> hearing from you.
>>
>> --
>> 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/d0247416-15e7-42c2-bf56-54ef95bb6733n%40googlegroups.com
>> 
>> .
>>
> --
> 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/CA%2BGDpiT2_qJGwRG658L6XxjWSP-xChCgO2nMgGVuTf9oXLbhPg%40mail.gmail.com
> 
> .
>

-- 
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/CAKHEhDK4ve78BOAnusZvs7XGG6MiqfjrxHyVmt%3DdgsKRnXtDnQ%40mail.gmail.com.


Re: Unpaid Internship

2023-05-01 Thread 5PM
i can learn

On Mon, May 1, 2023 at 3:28 AM Each1Teach1 Tech Inc <
pcintegral.pcintegr...@gmail.com> wrote:

> let's talk
>
>
> On Monday, April 24, 2023, John Diginee  wrote:
>
>> Dear Sir/Ma'am,
>>
>> I hope this message finds you well. I am a full-stack software
>> engineering student at Holberton School, a Silicon Valley-based software
>> engineering institution. I am reaching out to express my interest in an
>> unpaid backend intern or junior role at your esteemed company.
>>
>> My primary goal is to learn from your inspiring and experienced
>> developers and gain practical, real-world experience. I am not particularly
>> concerned about financial compensation at this time.
>>
>> I understand that my request may seem unconventional, but I would be
>> grateful for any opportunity to work with your company. I am a hardworking,
>> persistent, determined, resilient, and fast-learning individual, and I am
>> confident that I can contribute positively to your team.
>>
>> Here's my LinkedIn and GitHub profile for your review:
>> https://www.linkedin.com/in/johndiginee/
>> https://github.com/johndiginee
>>
>>  Thank you for your precious time and consideration. I look forward to
>> hearing from you.
>>
>> --
>> 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/d0247416-15e7-42c2-bf56-54ef95bb6733n%40googlegroups.com
>> 
>> .
>>
> --
> 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/CA%2BGDpiT2_qJGwRG658L6XxjWSP-xChCgO2nMgGVuTf9oXLbhPg%40mail.gmail.com
> 
> .
>

-- 
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/CANYR2gVADho0YkN0vjRSKet%3DhMrC0AutMx8U%3Des6L1pPgnHcZw%40mail.gmail.com.