Place
also you can create object into database directly like ModelName.objects.create(name=name, user=user) and so on
okay, can i show you my code and ask you for some help i did my best but still finding some problems
Place
okay i am doing it asap
Place
https://del.dog/pecymustyd here is it
Place
there must be a connexion between signals.py and another file of my project ? or i have to make it somewhere on the settings?
Morteza
https://del.dog/pecymustyd here is it
first remove the event_notification.save() the objects.create will do it already
Place
first remove the event_notification.save() the objects.create will do it already
okay thank you ! i never used the objects.create before thats why haha!
Morteza
first remove the event_notification.save() the objects.create will do it already
also add *args and **kwargs to your signal method after created
Morteza
also add *args and **kwargs to your signal method after created
arguments should be instance, created, *args, **kwargs
Morteza
there must be a connexion between signals.py and another file of my project ? or i have to make it somewhere on the settings?
in your apps.py, in your class appConfig, create function like this def ready(self): import appname.signals
Place
Morteza
did u create an app?
Place
yes so maybe u talking about the ./manage.py
Morteza
okay
https://del.dog/studowugog.txt
Morteza
hope this help
Place
https://del.dog/studowugog.txt
i made my post_save directly on my models.py and it worked, thanks to everyone!!
John
Quick question: Is it possible to monitize a blog on heroku's hobby account? Is it ideal for such purposes? I have one on free tier & I'm not sure about upgrading. Better yet, what hosting service is most suitable (affordability, efficiency) for a django blog expecting more web visits?
꧁❦ I'm Farooq ❦꧂
Is anyone have code to store output data in pdf file..?
Place
hello everyone, i have a problem using django-admin with mongodb, when creating a manytomany field it doesn't create a primarykey for the model1_model2 collections, so i would like to override the save_related and i wanted to ask how to edit it to add a primarykey to the new instance created on the collection model1_model2 ! thank you in advance
Ashutosh
Hi guys I want to know how to set custom expiration time for a session in django
You can set a variable ( check authentic function in django. Contribute. Auth app) in settings..
MYIL
Good morning friends
MYIL
While I'm searching ERP related I got about Django erp
MYIL
How to install it, it's support India gst tax system
MYIL
But many options for need a upgrade
Anonymous
Can I catch image file from request.POST.get('filename') filename is I am sending image from front-end
Bharathwajan
how can i determine how many values are there in post request i am having a form that returns n values i want to know the value of n can someone help me DM me
Bharathwajan
why i cant use request as an optional argument in views.py eg : def predict(*predict) i am doing this because i want a variable inside predict method
RKumar
How to join 3 tables in Django show
pankaj
How to join 3 tables in Django show
Bro if you will get any solution tell me also I m also facing same issues.
Bharathwajan
Bharathwajan
Enigma
does anyone knows why my template files does not found after i deployed my code on heroku?
Artur
does anyone knows why my template files does not found after i deployed my code on heroku?
Did you do: Python manage.py collectstatic? You can read about it https://docs.djangoproject.com/en/3.1/ref/contrib/staticfiles/#django-admin-collectstatic
Enigma
Did you do: Python manage.py collectstatic? You can read about it https://docs.djangoproject.com/en/3.1/ref/contrib/staticfiles/#django-admin-collectstatic
yes befor deploying on git and heroku it was fine on localhost , but now after i deployed it on heroku in the domin it gives me "Error during template rendering" and in my own code on pycharm it shows it brown and it can not render it from tmeplate folder |:
Ravi
Among MailChimp, SendGrid, SendInBlue which one is recommended for easy to integrate, better delivery, sending automated transactional and promotional emails? I see credits for sendgrid as a startup as well.
Artur
Can you screen in PM project structure?
Mehrdad
Hey there If I want to write a shop website Django is enough?
Enigma
Randy
https://github.com/alechries/MyHouse24Django/tree/master/MyHome24/apps/_db No migrations Throws an exception: django.db.utils.OperationalError: no such table: _db_user What could be the problem? Previously, everything worked When I load the database with the table, the migrations are successful, and if you delete the migrations and the database, then it throws an exception
Mehrdad
Yes
Thanks
Randy
Jay
django.db.utils.OperationalError: no such table: _db_user
Sqlite doesnt have persistent migration ...am not sure why that doesn't work for your case
Randy
Sqlite doesnt have persistent migration ...am not sure why that doesn't work for your case
Also, if I make the default Django user, then the same error appears, only auth.user
[IPT] Dmitry
hello guys! im not dev and not familiar with django. im trying to apply upgrade migrations and its fails. looks like lack of db objects. pls, send help https://github.com/netbox-community/netbox/issues/6034
Hamouda
how i can change username field in my Client model , class Client ( User ) :
Hamouda
just want to add editable = False
donal
I want to study and can ask people,,,,,Will someone help me? pleaseee
Randy
I display the forms modelformset. Tell me how to make sure that even if there is not one record in the model, so that the hidden form (hidden) is displayed?
Doragonsureiyā
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Satyendra
Profile
Pavel
Guys, I’m trying to attach model to current user: user = models.ForeignKey(User, verbose_name='User', on_delete = models.CASCADE) and getting the following error: «You are trying to add a non-nullable field 'user' to message without a default; we can't do that (the database needs something to populate existing rows).»
Pavel
User = get_user_model() in my case, it’s part of the django embedded model
Pavel
The question is - what may cause such a behavior? User cannot be empty or default
Pavel
I want to prohibit creation of entities for unauthorized users
Pavel
So, either I configure it this way: user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) or select default id? But what if it will be changed with time? I don’t want to ‘hardwire’ it
Mohammad
Hello I have a fixed query The expressions that I send to the model filter method are received from the user I want all the options in that field to be returned when the user does not submit a phrase to filter a field I do not want to write different queries I need the query to remain constant and to avoid any additional conditions and code
Anonymous
Thanks a lot
Future
hi, why i am getting this graphql.error.located_error.GraphQLLocatedError: (1146, "Table 'database.product' doesn't exist")
Future
PS C:\desktop\asiana.backend> python manage.py migrate Operations to perform: Apply all migrations: actions, admin, auth, autoservice, cart, contenttypes, graphql_auth, news, product, profiles, refresh_token, regions, sessions, users Running migrations: No migrations to apply. PS C:\desktop\asiana.backend> python manage.py makemigrations No changes detected
Felix
Any ideas to solve: OSError: [WinError 127] The specified procedure could not be found when installing GeoDjango on Windows 10
Pavel
models.ForeignKey(User, verbose_name='User', on_delete = models.CASCADE, default=)
Pavel
what may I add as default user?
Pavel
is id useable?
Pavel
ok
De Lorenzo
Hello guys - Any help where I can a library for marshalling class/model to the below. <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <RequestToken xmlns="http://tempuri.org/"> <APIUser>stringIUser></APIUser> <APIPassword>string</APIPassword> <TransID>string</TransID> <Amount>string</Amount> <ReferenceField>string</ReferenceField> <Msisdn>string</Msisdn> </RequestToken> </soap:Body> </soap:Envelope>