Re: hldp on my api

2020-12-21 Thread Anirudh Jain
Include JSONParser also On Sun, 20 Dec 2020, 12:35 Desh Deepak, wrote: > You have missed adding the Content-Type header in the headers section. > Just set the Content-Type header to application/json and it should work. > > On Sun, 20 Dec 2020, 1:37 am ola neat, wrote: > >> halo guys, i'm workin

Re: 127.0.0.1 refused to connect.

2020-12-21 Thread Anirudh Jain
Please send picture of your cmd/terminal where you are running the localserver On Fri, 18 Dec 2020, 21:59 Parul., wrote: > i am not able to connect , i tried to use 0.0.0.0:8000 , 0.0.0.0:8080 as > well, still getting same error. > used 127.0.0.1 with ports 8000 and 8080 still getting error > i

Re:

2019-11-27 Thread Anirudh Jain
Message on the URL ? Could you please give an example ? On Wed, 27 Nov 2019, 18:08 vaneet bawa, wrote: > can someone please tell me that how I can display the message on the url > from which I am getting the response > > -- > You received this message because you are subscribed to the Google Gro

Re: Internship

2019-11-22 Thread Anirudh Jain
If anyone, based out of Delhi/NCR, is looking for an internship as a Django developer, message me on telegram @i_m_root You should have fair knowledge about graphql and its implementation in django. Internship will be mostly remotely, might need to meet at some weekends. On Sat, 23 Nov 2019, 10:

Re: Can anyone sove my issue please!

2019-10-22 Thread Anirudh Jain
What is the error? On Tue, 22 Oct 2019, 16:49 Parvez Khan Pathan, wrote: > [image: pyissue2.png] > *Even check out my views.py file* > > On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote: >> >> [image: pyissue1.png] >> Sir Already Added! still got error!!! >> >> On Tues

Re: delete image url from database

2019-10-16 Thread Anirudh Jain
First of all, are you saving image url explicitly in database ? You dont need to so that to show/delete any image. Second, try delete() for deletint image entry. On Wed, 16 Oct 2019, 19:54 Nuno Vieira, wrote: > Hi there, > > i am creating a real estate app and i want users to insert and delete

Re: how to rectify this error

2019-09-20 Thread Anirudh Jain
Open the DOS as administrator and then try again On Fri, 20 Sep 2019, 21:59 idb solutions, wrote: > the server isn't running. > > -- > 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

Re:

2019-09-18 Thread Anirudh Jain
Or you can use filter() instead of all() On Wed, 18 Sep 2019, 17:46 Anirudh Jain, wrote: > a = YouModelName.objects.all().values_list() > b= a.order_by('created_at') > > On Wed, 18 Sep 2019, 17:44 Shakil Ahmmed, wrote: > >> I want to select all field in a model b

Re:

2019-09-18 Thread Anirudh Jain
ntry but select all field > > On Wed, Sep 18, 2019, 6:05 PM Anirudh Jain > wrote: > >> Example: YouModelName.objects.all().order_by('created_at') >> >> >> This will sort all the objects in your model on the basis of date of >> creation

Re:

2019-09-18 Thread Anirudh Jain
Example: YouModelName.objects.all().order_by('created_at') This will sort all the objects in your model on the basis of date of creation on that object. On Wed, 18 Sep 2019, 12:16 Shakil Ahmmed, wrote: > > How to select all field but group by one field > -- > >

Re: Please help me in views.py

2019-09-04 Thread Anirudh Jain
book name > > On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, > wrote: > >> This can be done easily if you make a proper view function and render >> data from it in template properly. >> A view function can be written like this :- >> >> Here I am assuming that yo

Re: Please help me in views.py

2019-09-04 Thread Anirudh Jain
Also, I am not sure how you have written html code, so use it properly according to your convinience. On Wed, Sep 4, 2019 at 2:41 PM Anirudh Jain wrote: > This can be done easily if you make a proper view function and render data > from it in template properly. > A view function can b

Re: Please help me in views.py

2019-09-04 Thread Anirudh Jain
yw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving email

Re: Please help me in views.py

2019-09-03 Thread Anirudh Jain
Could you please elaborate/be more clear about what you are really trying to do ? On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, wrote: > Hi Amit, > > You can use > =≠= > Book.objects.select_related(FK).select_related(FK). values (select column > name which you

Re: deploy django on AWS

2019-06-30 Thread Anirudh Jain
You can use ubuntu+nginx+gunicorn. There are some blogs on digital ocean regarding deployment. After you launch an ec2 instance on aws and connect to it via ssh from terminal, it won't matter whether you are using aws or digital ocean. On Sun, 30 Jun 2019, 22:07 Harshit Agarwal, wrote: > Hello D

Re: CSRF verification failed when I use smart phone

2019-06-26 Thread Anirudh Jain
Are you using it as a website or mobile app? If it is website then try logging out and login again. You might have logged in as another user or it might be a caching problem. On Wed, 26 Jun 2019, 08:31 Aldian Fazrihady, wrote: > Please make sure csrftoken cookie is returned to the Android app >

Re: Digital Ocean server Error

2019-06-17 Thread Anirudh Jain
could you run `journalctl -xe` tell us more about the log result On Mon, 17 Jun 2019, 17:08 Soumen Khatua, wrote: > Hi Folks, > > I uploaded my project into digital ocean but at the time of run > this*(sai@sai-foundation:~/saiproject$ > sudo systemctl status gunicorn) *command,I'm getting this

Re: How to print a value on page obtained from a user in Django form?

2019-06-08 Thread Anirudh Jain
First save the form after the user has input values using - `userform.save()` Then get that value using - val = userform.CharField Now send the `val` in the context and show it to user wherever you want PS- `CharField` would be whatever varuable name you have used in form/ModelForm On Sun, 9 Jun

Re: Error is MultiValueDictKeyError at /login

2019-06-05 Thread Anirudh Jain
In login function, could you try password =request.POST['password1'] You have used ['password'] On Wed, 5 Jun 2019, 17:22 sahukara harish, wrote: > Hi, to all can any one help me to rectify this error > > -- > You received this message because you are subscribed to the Google Groups > "Django u

Re: Where to find my web app within mysite directory ?

2019-05-28 Thread Anirudh Jain
If the command you had run did not show any error, then it should be in the same folder as that of manage.py On Wed, 29 May 2019, 01:16 Joseph Jones, wrote: > > > Hello fellow community members, >> >> I’m working on a Django project using PyCharm on my pc. I’ve run command >> ‘>py manage.py star

Re: problem with form

2019-05-28 Thread Anirudh Jain
Can you please send the screenshot or text of error. Also, try - form.save(commit=False) On Wed, 29 May 2019, 04:53 Saeed Pooladzadeh, wrote: > Hi > > I'm trying to make a simple crud applicatio and learn from it. I wonder > why my form can't save the data. Here cames my view: > > from django.sh

Re: Display image in template

2019-05-28 Thread Anirudh Jain
You will have to setup MEDIA path f8rst. All your uploded files will be stored in that folder. STATIC path is used only for, well, static content like css and js. On Tue, 28 May 2019, 23:31 anchal agarwal, wrote: > I want to display image dynamically from the database in a django > template. I h

Re: data not coming into html

2019-05-22 Thread Anirudh Jain
update']) > return redirect('cart_detail') > > > def cart_remove(request,product_id): > cart = Cart(request) > product = get_object_or_404(Product,id = product_id) > cart.remove(product) > return redirect('cart_detail') > > > > def cart_de

Re: data not coming into html

2019-05-22 Thread Anirudh Jain
Can you tell which function in which app you are using to show data in which template ? On Wed, 22 May 2019, 18:56 Soumen Khatua, wrote: > Hi Folks, > Guys I'm not getting my data into html after rendered that still I'm not > getting my data,i'm sharing my github link: > https://github.com/Heros

Re: django manage.py will not work

2019-05-15 Thread Anirudh Jain
You are probably not using virtual environment. Send snapshot of the error would help clarifying though. On Wed, 15 May 2019, 18:01 Emmanuel Simeon, wrote: > Are you having Multiple Version of Python Installed on Your System > > > On Wednesday, May 15, 2019 at 1:23:13 PM UTC+1, Ishant Agrawal wr

Re: Static files won't match the path given

2019-05-10 Thread Anirudh Jain
On server you will have to run - python manage.py collectstatic and this is after you have setup nginx for serving static files on the server. Have you set it up yet? On Sat, 11 May 2019, 10:54 Rookies DJ, wrote: > I apologise, I'm a hardware engineer, I'm not very familiar with coding; > I'm on

Re: Django URLs

2019-04-28 Thread Anirudh Jain
What is the function 'detail' ? You need to assign 'slug' variable also in order to pass it to the url. On Sun, 28 Apr 2019, 13:50 Aayush Bhattarai, wrote: > Hello Everyone, > > I want to pass two url in url of template. I have added in urls.py also. > > code:- > Index.html > *http://detail.id>

Re: I need help on adding a search button to an input field

2019-04-03 Thread Anirudh Jain
You can include the following code in the end ButtonHolder( Submit('submit', 'Update', css_class='btn btn-theme small') ) Take care of proper indentation. On Wed, 3 Apr 2019, 23:48 Nanjuki Saidat, wrote: > Hi everyone, > I want to add a search button to an input search field , if there is > an

Re: Upgrading Django from 1.11 to 2.2

2019-03-29 Thread Anirudh Jain
First use 'pip freeze' in your virtual env to see all the packages installed. Then checkout their official, latest documentation to see whether they support django2.1 or not. Even if all them do, you might need to make a lot of changes in your code after upgrade. And no, you dont need to install

Re: Installation Question

2019-03-29 Thread Anirudh Jain
that's because you want to use python 3.7 but by default it is using python 2.7 Try this to install virutal env: pip install -p python3 virtualenv On Fri, 29 Mar 2019, 13:15 Michael Achterberg, wrote: > When I run > > Pip install virtualenv > > I still get the SyntaxError: invalid syntax > > >

Re: django send_mail

2019-03-27 Thread Anirudh Jain
Instead of creating a word file, create a HTML template for it if you want the links of your social media accounts to work. Otherwise jusy save this file in static/images folder and load it in a template. Either way you will have to create a template. On Wed, 27 Mar 2019, 13:08 Aayush Bhattarai,

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Anirudh Jain
You can setup a logging and debugging logging system using gunicorn in production using flags :- --log-level debug --access-logfile /home/ubuntu/websitelogs.log For more setting options read gunicorn documentation https://docs.gunicorn.org/en/stable/settings.html#logging On Mon, 28 Jan 2019, 1

Re: regarding django hosting

2019-01-25 Thread Anirudh Jain
AWS EC2 is good with nginx and gunicorn On Sat, 26 Jan 2019, 13:04 tribhuvan kishor > can you guys please help which is best hosting solution for django > -- > regards > Tribhuvan Kishor Bhaskar > > -- > You received this message because you are subscribed to the Google Groups > "Django users" gr

Re: how can I reference a field from one model to another model

2019-01-25 Thread Anirudh Jain
You can do this easily by creating creating an object of that model from which you want to get the value or input a value by using 'get_object_or_404' or 'get_list_or_404' by importing from django.shortucts. Reas about these two functions and difference between them in documentation. Use them, for

Re: Charfield variable length

2019-01-23 Thread Anirudh Jain
If you are sure that values entered will only be 0s and 1s then why not use IntegerField(). But if really want to use CharField() and you know that size won't be larger than 180bits then use CharField(max_lenght=25) On Thu, 24 Jan 2019, 06:23 Mike Dewhirst On 24/01/2019 9:14 am, 'Odile Lambert' v

Re: Poll Tutorial: I'm stuck I have mysql on my vps I created the database

2019-01-22 Thread Anirudh Jain
ango-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/fb36ebb9-ad3c-448a-a290-2fac0f7cd345%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/fb36ebb9-ad3c-448a-a290-2fac0f7cd345%40googlegroups.com?utm_medium=email&ut

Re: Who use django-allauth!

2018-12-04 Thread Anirudh Jain
Where do you want to redirect them? Where exactly is the problem? On Tue, 4 Dec 2018, 17:53 I can't authorize users at my project. If I'm going to login with > http://127.0.0.1:8000/account/login I'm redirecting to index page. > > -- > You received this message because you are subscribed to the G

Re: Use Email to Login With Django Auth

2018-11-02 Thread Anirudh Jain
Hey William Is it you who runs the website wsvincent.com ? Great stuff you have out there. Keep working man !! On Fri, 2 Nov 2018, 19:08 William Vincent As others have noted, the short answer is use django-allauth. Here's a > basic implementation that might help: https://github.com/wsvincent/dja

Re: Use Email to Login With Django Auth

2018-11-02 Thread Anirudh Jain
Use django allauth library. It's great. On Thu, 1 Nov 2018, 17:39 Ryan Shepard How could i go about allowing people to also use their email to sign into > Django instead of a username? I have done research my self and tried > creating my own backend for it. But it doesn't work. > > -- > You recei

Can anyone please help me solve this question?

2018-08-29 Thread Anirudh Jain
Here is the question that I posted earlier yesterday and it is still unsolved https://stackoverflow.com/questions/52054246/how-to-add-a-foreign-key-from-multiple-options-available-in-model-for-that-key-i It is very urgent for me to solve this question and this is the last part where I am stuck

Re: Django database problem

2018-08-17 Thread Anirudh Jain
You will have to create a database on your system first (it is better to use mysql instead of sqlite) and then run commands :- 1. python manage.py makemigrations 2. python manage.py migrate Also you will have to create forms (forms.ModelForm or forms.Forms) for taking input. On Fri, 17 Aug 2018,

Re: '$' is not recongnized

2018-08-16 Thread Anirudh Jain
while copy pasting the command, you must have copied '$' as well and pasted it in the terminal. Remove $ from the begining and try again. I am sure it would work. On Fri, 17 Aug 2018, 01:33 Brandon Hernandez, wrote: > Im trying to follow the tutorial for django, but i cant figure out how to > ma

Running a django website on AWS EC2 on ubuntu

2018-07-02 Thread Anirudh Jain
I am getting the following error on running the command :- "sudo journalctl -u gunicorn" Error is :- Jul 02 20:05:35 ip-172-31-40-226 systemd[1]: Started gunicorn daemon. Jul 02 20:05:35 ip-172-31-40-226 systemd[1]: gunicorn.service: Main process exited, code=exited, status=200/CHDIR Jul 02 20:

Re: Can't access my django runserver

2018-07-01 Thread Anirudh Jain
Can you please show your directory structure ? Just take the screenshot of your project tree from code editor and that would be enough. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Re: Can't access my django runserver

2018-06-30 Thread Anirudh Jain
You forgot to put 'comma' after DIRS': [os.path.join(BASE_DIR, 'templates')] in templates. It should be DIRS': [os.path.join(BASE_DIR, 'templates')], On Sat 30 Jun, 2018, 15:52 Umar Kambala, wrote: > > this are my codes... > > # SECURITY WARNING: don't run with debug turned on in production! >