mukul
how can i backup my site on ubuntu server
Sai
You mean backup ur db
Sayooj
Hy anyone know how to send mail message in django website on production?
mukul
You mean backup ur db
yes... if backup of whole website is possible then both..
mukul
Hy anyone know how to send mail message in django website on production?
you can use django email... or other python mailing library (smtplib)...
Faraday
from django.contrib import auth from django.db import models class Articles(models.Model): article = models.TextField(max_length=1000) Date_Created = models.DateTimeField(auto_now_add=True) def str(self): return self.article class Author(models.Model): name = models.CharField(max_length=30, help_text="Name of the author") email = models.EmailField(max_length=35, help_text="Author\'s email Address") date_joined = models.DateField(auto_now_add=True) website = models.URLField(help_text="Author\'s official Website.") author = models.ForeignKey(Articles, on_delete=models.CASCADE) def str(self): return self.name class Genre(models.Model): class Author_genre(models.TextChoices): Horror = "HORROR", "horror" Fiction = "FICTION", "fiction" Romance = "ROMANCE", "romance" Sci_Fi = "SCI_FI", "sci_fi" Article = models.ForeignKey(Author, on_delete=models.CASCADE) author = models.ForeignKey(Articles, on_delete=models.CASCADE) genre = models.CharField(max_length=15, choices=Author_genre.choices, verbose_name="The genre of the author ") class Comment(models.Model): comment = models.TextField(help_text="Reaction about the article.") date_commented = models.DateTimeField(auto_now_add=True) creator = models.ForeignKey(auth.get_user_model(), on_delete=models.CASCADE) Article = models.ForeignKey(Author, on_delete=models.CASCADE) author = models.ForeignKey(Articles, on_delete=models.CASCADE) Guys how can I solve a "django.db.utils.IntegrityError: NOT NULL constraint failed: writer_author.author_id" error ?
Shivam
Why you use foreignkey, an author have multiple articles, use many to many field
*( (*
One to many
Sayooj
you can use django email... or other python mailing library (smtplib)...
Do you know any python library useful for production ?
Sayooj
Use django email
But it's not working on production
mukul
But it's not working on production
are you using two step verification in mail ??
Sayooj
are you using two step verification in mail ??
Yes that also need and I want to send mail to different email in specified time . It need work automatically
Sayooj
mukul
Yes that also need and I want to send mail to different email in specified time . It need work automatically
the reason for not working of django mail is your account two step verification system...
mukul
Yes that also need and I want to send mail to different email in specified time . It need work automatically
cosmicdevelopment.com/blog/how-to-send-scheduled-emails-with-the-programming-language-python/
Champak Lal
Can anyone help me in making dependency chain by django
Champak Lal
But the problem is i need to create 4 select tags
Champak Lal
Country, state, district,city
Champak Lal
Plz help me
Prasanna
Am looking for python flask paid support . Looking for someone who has strong experience. Please ping me if interested
Genemator
how to return to urls of project from app's urls
coder
python in local variable can value pass to bottom to up?
coder
how to return to urls of project from app's urls
1st. add app inside setting.py in INSTALLED_APPS = ["app"] like this 2nd. Inside project urls.py in urlpatterns = [ path('app', include('online_meditation.urls')),] 3th app inside url.py urlpatterns = [ ] write you custom link
srilekha
hey upgrad course for ML is good or IIT madras data science platform????
kevin
Any one completed pyplane 7 hours django 1 video
dmitriy
Hey guys, I have a problem with the django admin, I have two unrelated tables, and I need to show the information from the first on the changes page of the second
dmitriy
it will be super if the information from the table is a filter
SARDOR.
Hi guys, I need a help. So, I can't really understand JSON in Pyhton, Coul you advice me some useful videocouses or resources ? Thanks in advance
AJ
JSON library docs can be a good start
SARDOR.
you know, it is being kinda boring
SARDOR.
and i can't get it
𝑅𝑜𝒻𝒾𝑒𝓋
hi y'll i have a question regarding 'null'. i understood the function of default and blank when they are set True or False. But i cant understand the purpose, the function of null = True/False. i d be glad if anyone responds me😊
Sergey
Hi everyone! I do my app on drf and i want to use logging. I setup like: https://pastebin.com/SBGHW0kT. But logger.info not working only logger.error. Any thoughts?
*( (*
def index(request): form = UserRegistrationForm(request.POST) if request.method == 'POST': if form.is_bound(): if form.is_valid(): form.save() redirect('app/home.html') return render(request, 'app/index.html', {'form': form})
*( (*
i am not able to save the data from the form
5P34R
add a breakpoint in between form.is_valid
5P34R
and check whether the datas are valid or not
5P34R
what is a breakpoint
Like we do in editors python have inbuild breakpoint function. Which helps to pause the execution of code depends on where u add the breakpoint and then u can do or verify whatever within its prompt and the code
web
Hello.. Look for freelancer server sites requests simple projects to medium so that the 2nd level beginner programmer can work and get experience .. thanks
Musa
But it can only store one value in the choice field.i need to store multiple values
You can create a dictionary of the 3 options and pass it as choices in the choisefield
Musa
....
Hello guys , I got an error in django , when i trying build a project .. NoReverseMatch at /review-sec/ Reverse for 'detail' with arguments '('',)' not found. 1 pattern(s) tried: ['review\\-sec/detail\\-review/(?P<slug>[-a-zA-Z0-9_]+)/$'] Tried and searched lot of times to solve that problem , no use. Didn't get the answer , So please check this code , https://dpaste.org/ZRoM#L1,22,38,56,73,87 Answer me if you know. . Pls ..
~:$
Integration of fb pixel directly to website or via google tag manager..... which option is more suitable or has advantages/disadvantages. Expert opinion required. Thank you.
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
5P34R
What is bound?
https://docs.djangoproject.com/en/3.2/ref/forms/api/
Anonymous
In app or / project ? Which url .???
To template which you go back, I have edited check it
*( (*
What is bound?
The form is bound If the input field is filled
....
Anonymous
Thank you bro ... Line no pls. ???
It is about your URL path check in your templates example your link <a href="/detail">Detail />. And you change in URLs.py /detail/Id. You have to change to your templates <a href="detail/Id/
....
Yes, no slash,check to all related links
Yeah , I defined the {url} in there only ,.. Also ,. If I change the a.slug to a.pk and also in urls.py <slug:slug> into <slug:pk> It's work perfectly ... So is it about the "/ "problem .?