Not upoading image files in django

2016-08-27 Thread Mannu Gupta
Image file is not getting uploaded using Django my all model,view and forms files are attached with this link -- 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

Testing UpdateView in Django using Unittest

2017-07-27 Thread Mannu Gupta
I am writing a test case for my Django application named "blog". I am getting the following errors :- 1. I am testing my view function i.e PostUpdateview the code is class PostUpdateView(LoginRequiredMixin, UserOwnerMixin, UpdateView): model = Post form_class = PostModelForm

Getting response code 302 instead of 200 while testing a url

2017-07-27 Thread Mannu Gupta
I have a django named blog and trying to test the url. The code for testing is :- class PostTests(TestCase): def setUp(self): self.user = get_user_model().objects.create(username='some_user') self.title = "test-title" Post.objects.create(

Re: Getting response code 302 instead of 200 while testing a url

2017-07-31 Thread Mannu Gupta
Hi James, Thanks for the reply! As in the setup function for my tests i have already created a Post object then how just visiting a url i.e '/update/' and 'delete/' of that object can be a considered 'POST' request. Also Is there any way to capture the inbetween changing process of status code

Django Internship

2017-05-17 Thread Mannu Gupta
Hi everyone, I have been learning on Django for around 6+ months, Now looking for a internship based on it .If anyone know about any internship offer then please let me know. My Website :- http://theparadoxer02.github.io Github:- http://github.com/theparadoxer02 Thanks -- You received

User Based role in Django

2017-06-21 Thread Mannu Gupta
I want to make a role based user in Django like the following :- User with Subscription level 0 will have some feature and some basic fields like first name , last name etc. User with Subscription level 1 will have some more feature and some extra fields like tax-id , national id ,

Re: User Based role in Django

2017-06-21 Thread Mannu Gupta
;Jani Tiainen" <rede...@gmail.com> wrote: > Well its your code, so yes if you write code that does it. > > It doesn't happen magically for you. > > 21.6.2017 11.15 "Mannu Gupta" <abhimanyu98...@gmail.com> kirjoitti: > >> Hi , >> Will I be abl

Re: User Based role in Django

2017-06-21 Thread Mannu Gupta
Hi , Will I be able to trace if user upgrde the subscription level ? Manni On Wed, Jun 21, 2017 at 1:41 PM, Jani Tiainen <rede...@gmail.com> wrote: > Hi, > > We have been using user groups for that. And then we check and filter out > based on given group(s). > > 21.6

Re: Django Internship

2017-05-19 Thread Mannu Gupta
, that is OK. Showing me one project where you really excelled (eg > see #4) is far better than a lot of poorly done projects with irrelevant > fluff surrounding them. > Now I have pinned the good projects that i have done, now it is looking better.Previously I did now know th

get_ip_address() not working when used Custom Decorators

2017-09-28 Thread Mannu Gupta
While making a customer decorator in django, the code is here :- def owner_required(function): def wrap(request, *args, **kwargs): print(request) ip_address = get_client_ip(request) ip_exist = Node.objects.get(ip_address=ip_address) if ip_exist:

Re: get_ip_address() not working when used Custom Decorators

2017-09-28 Thread Mannu Gupta
I am just using it in a view function. For example:- @owner_required def all(request, **kwargs): pass On Friday, September 29, 2017 at 12:33:09 AM UTC+5:30, Mannu Gupta wrote: > > While making a customer decorator in django, the code is here :- > > def owner_required(function

Re: get_ip_address() not working when used Custom Decorators

2017-09-30 Thread Mannu Gupta
Covtushenko wrote: > > Hi Mannu, > > It seems like all are ok. > Sorry, but do you use it in just one place? > And do you see response in console from your print? > > Regards, > Constantine C. > > On Thu, Sep 28, 2017 at 4:36 PM, Mannu Gupta <abhiman...@gmail.

Encrypt Directory in Django

2017-09-27 Thread Mannu Gupta
I am trying to save a customer generated report in pdf format. I have used django file field to store the pdf. "models.FileField(upload_to='directory/pdfdirectory')" Since it will be user-generated pdf and will be different for each user, Also along with making a custom subdirectory for