Re: How to provide background image via url() in django

2020-07-16 Thread sunday honesty
Thanks all... @Sujara own worked for me On Fri, Jul 17, 2020, 6:07 AM Sujata Aghor wrote: > I set background image like below in the style tag of the html page. It > works ! > > >body{ > background: url({% static 'users/img/bg/name_of _image.png'%}) > no-repeat center center fixed; >

Download attachments plain text encoding 'ANSI'

2020-07-16 Thread Marchi
Hi, I hope the encoding type of the download plintext file is ANSI, not UTF-8. View.py ... with open(file_path + filename, 'r', encoding='cp949') as fd: # This plain text file from inside the server is an ANSI (cp949) encoded file. response = HttpResponse(fd) response['Content-Type

Re: How to save images posted by application users

2020-07-16 Thread Exactly musty
I also had the same problem long time ago I remember i felt like hanging myself,here is what I did, i deleted the media folder,created by django, try this if it will work -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from thi

Re: How to save images posted by application users

2020-07-16 Thread Ram
Hi Mottaz, Thank you for your suggestion. We already tried a model with ImageField but not luck yet. Here is our code snippet image = models.ImageField(upload_to='media', > null=True, blank=True) image2 = models.ImageField(upload_to='media', > null=True, blank=True) image3 = models.ImageField(upl

Please help I want to list down all the users with the sharewith from the frontend in backend I used Many to Many field and also my data is not getting into database

2020-07-16 Thread mick
views.py def notesadd(request): form = NoteForm(request.POST or None) if form.is_valid(): form.save() form=NoteForm() context = { 'form': form } print('submitted') return render(request, 'notes.html', context) models.py class Notes(mode

Re: How to provide background image via url() in django

2020-07-16 Thread Sujata Aghor
I set background image like below in the style tag of the html page. It works ! body{ background: url({% static 'users/img/bg/name_of _image.png'%}) no-repeat center center fixed; -webkit-background-size:cover; -moz--background-size:cover; -o--background-size:cover; backgro

Re: How to provide background image via url() in django

2020-07-16 Thread Exactly musty
i encounter alot shit when adding static to a url background images,django templates can be shitty sometimes,because sometimes it wont pick up due to some spacing ,its very annoying,here is what i do either i write the same code by myself again beneath it but mostly it always worked by copying

Re: How to provide background image via url() in django

2020-07-16 Thread Desh Deepak
Try it url(" static 'some_path/image.png' ") On Fri, 17 Jul 2020, 4:38 am sunday honesty, wrote: > Hi django users, pls help me with this: > > In case we supply background image via the url() function as > background-image: url("some_path/image.png") > > How do we do this in django static files

How to provide background image via url() in django

2020-07-16 Thread sunday honesty
Hi django users, pls help me with this: In case we supply background image via the url() function as background-image: url("some_path/image.png") How do we do this in django static files? I tried url("{% static 'some_path/image.png' %}") but it didn't work, how do I do this pls? -- You rece

Re: ModuleNotFoundError: No module named 'django'

2020-07-16 Thread Exactly musty
Are you sure you are in your virtual environment, if not make sure you activate your env then install all requirements before you migrations or runserver On Thursday, July 16, 2020 at 7:50:11 PM UTC+1, harshith kumar pedarla wrote: > > I'm getting this error > > Traceback (most recent call

ModuleNotFoundError: No module named 'django'

2020-07-16 Thread harshith kumar pedarla
I'm getting this error Traceback (most recent call last): File "C:/Users/lenovo/Desktop/Django Projects/telusko/telusko/urls.py", line 16, in from django.contrib import admin *ModuleNotFoundError: No module named 'django'* could someone please help in resolving this error in pycharm in

Re: Two factor authentication using OTP

2020-07-16 Thread carlos
https://github.com/django-otp/django-otp-yubikey On Thu, Jul 16, 2020 at 7:50 AM Kasper Laudrup wrote: > Hi o1bigtenor, > > On 16/07/2020 15.18, o1bigtenor wrote: > > > > As a person who has very very very terrible wireless phone reception > > where I live I would hope that there is some other m

Re: Two factor authentication using OTP

2020-07-16 Thread Kasper Laudrup
Hi o1bigtenor, On 16/07/2020 15.18, o1bigtenor wrote: As a person who has very very very terrible wireless phone reception where I live I would hope that there is some other method that can be used to help with two factor authentication without using the bloody useless cell phone. It seems t

Re: Two factor authentication using OTP

2020-07-16 Thread o1bigtenor
On Thu, Jul 16, 2020 at 6:52 AM Issa Kehinde wrote: > Hello everyone! > > How can I implement a two factor authentication for my django web app? > After a user login with his/her credential (i.e. username and password), I > want an OTP to be send to the user's phone number . The user will ente

Re: Two factor authentication using OTP

2020-07-16 Thread Kasper Laudrup
Hi Issa, On 16/07/2020 11.36, Issa Kehinde wrote: Hello everyone!  How can I implement a two factor authentication for my django web app? After a user login with his/her credential (i.e. username and password), I want  an OTP to be send to the user's phone number . The user will enter  the

Joining 4 tables on 2 columns

2020-07-16 Thread Omar aboul makarem
class Company(models.Model): id = models.UUIDField(primary_key = True, default = uuid.uuid4, editable = False) name = models.CharField(_('Name'), max_length=64) class Approval(models.Model): id = models.UUIDField(primary_key = True, default = uuid.uuid4, editable = False) company =

Two factor authentication using OTP

2020-07-16 Thread Issa Kehinde
Hello everyone! How can I implement a two factor authentication for my django web app? After a user login with his/her credential (i.e. username and password), I want an OTP to be send to the user's phone number . The user will enter the OTP to gain final access to the web application.

Re: How to save images posted by application users

2020-07-16 Thread Mottaz Hegaze
You need a model with ImageField or FileField On Thu, 16 Jul 2020, 7:07 am Ram, wrote: > Hi, > > We need to save images posted by our application users and the images will > be displayed in application UI once they are saved successfully. We are > trying with these parameters in our settings.py