DoesNotExist at /admin/blog/blog/add/: blog matching query does not exist

2022-09-13 Thread Jaap van Wingerde
Suddenly I can no longer add blogs to Django. Django says 'blog
matching query does not exist'. That seems strange to me because I want
to add something to the database and not request a blog. What could be
going on here?

admin.py:
class blogadmin(admin.ModelAdmin):
def save_model(self, request, obj, form, change):
if not change:
obj.added_by_user = request.user.username
obj.ip_added = request.META['REMOTE_ADDR']
if obj.ip_added == '127.0.0.1':
obj.ip_added = request.META['HTTP_X_FORWARDED_FOR']
obj.publish = False
del obj.publish_date
else:
obj.changed_by_user = request.user.username
obj.ip_changed = request.META['REMOTE_ADDR']
if obj.ip_changed == '127.0.0.1':
obj.ip_changed = request.META['HTTP_X_FORWARDED_FOR']
if obj.publish == True:
if not obj.publish_date:
obj.publish_date = obj.datetime_changed
super(blogadmin,self).save_model(request, obj, form, change)

I can add text, photographs etc., but no blogs, changing is ok.

Notifications:
DoesNotExist at /admin/blog/blog/add/

blog matching query does not exist.

Request Method: POST
Request URL:http://127.0.0.1:8001/admin/blog/blog/add/
Django Version: 4.1.1
Exception Type: DoesNotExist
Exception Value:

blog matching query does not exist.

Traceback
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8001/admin/blog/blog/add/

Django Version: 4.1.1
Python Version: 3.10.5
Installed Applications:
['grappelli',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'blog.apps.BlogConfig']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.contrib.admindocs.middleware.XViewMiddleware']

Traceback (most recent call last):
  File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/core/handlers/exception.py",
line 55, in inner response = get_response(request) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/core/handlers/base.py",
line 197, in _get_response response = wrapped_callback(request,
*callback_args, **callback_kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/contrib/admin/options.py",
line 686, in wrapper return self.admin_site.admin_view(view)(*args,
**kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/utils/decorators.py",
line 133, in _wrapped_view response = view_func(request, *args,
**kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/views/decorators/cache.py",
line 62, in _wrapped_view_func response = view_func(request, *args,
**kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/contrib/admin/sites.py",
line 242, in inner return view(request, *args, **kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/contrib/admin/options.py",
line 1890, in add_view return self.changeform_view(request, None,
form_url, extra_context) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/utils/decorators.py",
line 46, in _wrapper return bound_method(*args, **kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/utils/decorators.py",
line 133, in _wrapped_view response = view_func(request, *args,
**kwargs) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/contrib/admin/options.py",
line 1750, in changeform_view return self._changeform_view(request,
object_id, form_url, extra_context) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/contrib/admin/options.py",
line 1802, in _changeform_view self.save_model(request, new_object,
form, not add) File "/var/django/liakoster.nl/blog-1/blog/admin.py",
line 26, in save_model super(blogadmin,self).save_model(request, obj,
form, change) File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/contrib/admin/options.py",
line 1225, in save_model obj.save() File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/db/models/base.py",
line 831, in save self.save_base( File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/db/models/base.py",
line 882, in save_base updated = self._save_table( File
"/var/django/liakoster.nl/blog-1/lib/python3.10/site-packages/django/db/models/base.py",
line 1025, in _save_table results = self._do_insert( File
"/var/

RE: Looking for a Django firm

2022-09-13 Thread Osinaike Gbemileke
Hi, I am interested Sent from Mail for Windows From: Mike DewhirstSent: Tuesday, September 13, 2022 1:01 AMTo: Django usersSubject: Looking for a Django firm Hi all - I'm looking for a Django outfit with an interest in chemistry or customers in the chemical industry in Australia. Possible opportunity. Best to respond off list and there will be an NDA. Cheers Mike -- 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/5b7dfee7-dc18-052d-994f-a27bb78ed71d%40dewhirst.com.au. 



-- 
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/63D0863C-0180-48F5-8533-7C3883BF71FB%40hxcore.ol.


Re: how to make https work in django REST framework

2022-09-13 Thread sham khan
Hi Zhenwu,

May you share the details of how you got this working? 

Regards,
Shamim

On Friday, February 14, 2014 at 2:47:43 AM UTC+5:30 zhen...@gmail.com wrote:

>
> Thanks all for your help. Finally we figured out how to do it from the doc 
> link Kirby provided. Really appreciated your help.
>
> thanks.
>
> /zhenwu
>
>
> On Thursday, February 13, 2014 11:20:53 AM UTC-8, zhenwu he wrote:
>>
>>
>> Thank you! working on it. thanks.
>>
>> /zhenwu
>>
>> On Thursday, February 13, 2014 11:06:55 AM UTC-8, C. Kirby wrote:
>>>
>>> Use the django deployment docs for a howto: 
>>> https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
>>>
>>> On Thursday, February 13, 2014 12:58:53 PM UTC-6, zhenwu he wrote:


 Thanks Kirby.

 You meant merge django into apache? ok, let me see what I can do. 
 thanks.

 /zhenwu

 On Thursday, February 13, 2014 10:18:03 AM UTC-8, C. Kirby wrote:
>
> Zhenwu,
>
> You only mentioned it in passing in the last post, but did you say you 
> are running django in production via the manage.py runserver command? You 
> _really_ shouldn't use runserver in production. You should be using a 
> webserver (I guess apache in your case) and wsgi to serve up django.  
>


-- 
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/742e4785-0760-4872-85dd-eb65d80e0bddn%40googlegroups.com.


CAn we use Django framework in company industry ?

2022-09-13 Thread خالد بن الوليد صحراوي
Hello.
I 'm working with Django to build a Web app for my industrial company, 
I wans to ask if it possible to build it and use it for free 
is that possible ?

-- 
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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%40googlegroups.com.


Re: CAn we use Django framework in company industry ?

2022-09-13 Thread Nikalesh Patil
Write this mail in urdhu 

On Tue, 13 Sep, 2022, 7:42 PM خالد بن الوليد صحراوي, <
mascara.sahraou...@gmail.com> wrote:

> Hello.
> I 'm working with Django to build a Web app for my industrial company,
> I wans to ask if it possible to build it and use it for free
> is that possible ?
>
> --
> 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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%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%2Bohtm8WKAaVhqM6ZnprRSSx1Oe_9PxhKzT-nA1yc0_kz6v01w%40mail.gmail.com.


Re: CAn we use Django framework in company industry ?

2022-09-13 Thread Abdulfarid Olakunle
Yes, And I will be very happy to work with you for free on this your
project. Just to gain more experience and connect with like minds
Hoping for your response


On Tue, Sep 13, 2022, 3:11 PM خالد بن الوليد صحراوي <
mascara.sahraou...@gmail.com> wrote:

> Hello.
> I 'm working with Django to build a Web app for my industrial company,
> I wans to ask if it possible to build it and use it for free
> is that possible ?
>
> --
> 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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%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%2BccuR39c80xAi57q78TEbYtRgOME356ZNBC9RiXxhW-B-9ZTQ%40mail.gmail.com.


Re: CAn we use Django framework in company industry ?

2022-09-13 Thread Sada Nanda
Hello sir I am sadananda actually I want to start a ride sharing website
using django and python is that possible sir?

On Tue, Sep 13, 2022, 7:46 PM Nikalesh Patil 
wrote:

> Write this mail in urdhu 
>
> On Tue, 13 Sep, 2022, 7:42 PM خالد بن الوليد صحراوي, <
> mascara.sahraou...@gmail.com> wrote:
>
>> Hello.
>> I 'm working with Django to build a Web app for my industrial company,
>> I wans to ask if it possible to build it and use it for free
>> is that possible ?
>>
>> --
>> 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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%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%2Bohtm8WKAaVhqM6ZnprRSSx1Oe_9PxhKzT-nA1yc0_kz6v01w%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/CACK4g1pNwyqU9hBRWSP%2B029LbexyU1Utgi4ttXS%2BCDDqq-nB1w%40mail.gmail.com.


Portainer weird situation

2022-09-13 Thread Marcella Carvalho
Hi, guys.
I use portainer to manage my docker containers. One of them is my django 
webapp, with a binded mounted volume in my server.

When I recreated the container today with a newer image version, Portainer 
erased my volume. It never happened before.

So, my question is, this has ever happened to you? How did you solve 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/a8a83f5c-cbce-4aa7-b848-ef0784290e34n%40googlegroups.com.


Re: CAn we use Django framework in company industry ?

2022-09-13 Thread Anh Nguyen
Yes. It’s free.

On Tue, 13 Sep 2022 at 22:53 Sada Nanda 
wrote:

> Hello sir I am sadananda actually I want to start a ride sharing website
> using django and python is that possible sir?
>
> On Tue, Sep 13, 2022, 7:46 PM Nikalesh Patil 
> wrote:
>
>> Write this mail in urdhu 
>>
>> On Tue, 13 Sep, 2022, 7:42 PM خالد بن الوليد صحراوي, <
>> mascara.sahraou...@gmail.com> wrote:
>>
>>> Hello.
>>> I 'm working with Django to build a Web app for my industrial company,
>>> I wans to ask if it possible to build it and use it for free
>>> is that possible ?
>>>
>>> --
>>> 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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%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%2Bohtm8WKAaVhqM6ZnprRSSx1Oe_9PxhKzT-nA1yc0_kz6v01w%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/CACK4g1pNwyqU9hBRWSP%2B029LbexyU1Utgi4ttXS%2BCDDqq-nB1w%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/CAKaoNbRn2ERR1Mx8JA%2B9CmW7P%3DMgCeO8OLHbe9YdKV_C7xZJhw%40mail.gmail.com.


save_model doesn't run on Django version 4

2022-09-13 Thread Mike Kilmer
After having upgraded from Django 3 to 4 the save_model() method isn't 
running, though the form it imports does.

```
class MyCoolMapAdmin(SuperUserChangeOnlyMixIn, FilterByOwnerAdmin):
form = MyCoolModelForm
print("this prints on app initialization")

def save_model(self, request, obj, form, change):
print("this never runs")

class MyCoolModelForm(forms.ModelForm):

def clean(self):
print("this does run")
```

The `save_model` method doesn't seem to run for new or updated form 
submission from the "MyCool" admin page.

Thank 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/2051c3c8-d6ca-4d99-a5fe-d1b9f0897b08n%40googlegroups.com.


Re: save_model doesn't run on Django version 4

2022-09-13 Thread Mike Kilmer
One thing I'm not sure of it, how to tell if a particular Admin page is 
triggering a particular Admin instance.

On Tuesday, September 13, 2022 at 11:27:54 AM UTC-5 Mike Kilmer wrote:

> After having upgraded from Django 3 to 4 the save_model() method isn't 
> running, though the form it imports does.
>
> ```
> class MyCoolMapAdmin(SuperUserChangeOnlyMixIn, FilterByOwnerAdmin):
> form = MyCoolModelForm
> print("this prints on app initialization")
> 
> def save_model(self, request, obj, form, change):
> print("this never runs")
>
> class MyCoolModelForm(forms.ModelForm):
>
> def clean(self):
> print("this does run")
> ```
>
> The `save_model` method doesn't seem to run for new or updated form 
> submission from the "MyCool" admin page.
>
> Thank 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/29eeac28-112a-4935-b0c8-62e48b6a49den%40googlegroups.com.


Re: CAn we use Django framework in company industry ?

2022-09-13 Thread Mohammed Alnajdi
Yes, Django is an open source framework and you can use it to build your own 
websites.



Sent from my iPhone

> On 13 Sep 2022, at 5:11 PM, خالد بن الوليد صحراوي 
>  wrote:
> 
> Hello.
> I 'm working with Django to build a Web app for my industrial company, 
> I wans to ask if it possible to build it and use it for free 
> is that possible ?
> 
> -- 
> 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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%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/1FDC01B2-953C-473A-8520-E2657FCD1298%40gmail.com.


Re: CAn we use Django framework in company industry ?

2022-09-13 Thread Scott Sawyer
Here is where license information is found on the website:  It is a 3 
clause BSD License.


https://docs.djangoproject.com/en/4.1/faq/general/#:~:text=Django%20is%20distributed%20under%20the,to%20modify%20and%20redistribute%20Django.

So it's 'free' as in beer and free as in speech but there are some 
restrictions.


-Scott

On 9/13/2022 7:11 AM, خالد بن الوليد صحراوي wrote:

Hello.
I 'm working with Django to build a Web app for my industrial company,
I wans to ask if it possible to build it and use it for free
is that possible ?

--
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/0e00eaef-bad6-4ec8-9f4c-cd6a0de19ed4n%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/b1ba72c7-8576-88a5-85e9-6a80722dcc10%40gmail.com.