template syntax error

2018-03-04 Thread harsh sharma
i created a model in which i have an image filed but when ever i am trying to get an uploaded image on the in my model.py image = models.ImageField(upload_to='static/pictures',) setting.py STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static", "./static"),

Re: unable to save object Django (2.0)

2018-01-26 Thread harsh sharma
nager()a=object.create_person("this","c.com > <http://c.com>",1);a.save()* > > On Tuesday, January 23, 2018 at 8:10:00 PM UTC, harsh sharma wrote: >> >> i am trying to save the basic information about a person >> i have created a model form for it bu

Re: unable to save object Django (2.0)

2018-01-26 Thread harsh sharma
their is no error message i am doing something wrong in my forms which is being solved thank you regards On Friday, January 26, 2018 at 3:09:43 AM UTC+5:30, Andy wrote: > > what is the actual error message? > > Am Dienstag, 23. Januar 2018 21:10:00 UTC+1 schrieb harsh sharma

Re: unable to save object Django (2.0)

2018-01-26 Thread harsh sharma
thank you the problem has being solve regards On Friday, January 26, 2018 at 10:56:14 AM UTC+5:30, Omar Abou Mrad wrote: > > > On Tue, Jan 23, 2018 at 10:10 PM, harsh sharma <harshsha...@gmail.com > > wrote: > >> i am trying to save the basic information about

Re: unable to save object Django (2.0)

2018-01-26 Thread harsh sharma
change that variable but still i mm unable to save the object On Friday, January 26, 2018 at 10:56:14 AM UTC+5:30, Omar Abou Mrad wrote: > > > On Tue, Jan 23, 2018 at 10:10 PM, harsh sharma <harshsha...@gmail.com > > wrote: > >> i am trying to save the basic informatio

Re: django 2 - How do I make search box?

2018-01-25 Thread harsh sharma
i think you can create a form for this and integrate in your template. through which u can search in your database . and for more details check https://docs.djangoproject.com/en/2.0/topics/forms/ On Tuesday, January 23, 2018 at 5:04:48 PM UTC+5:30, Carl Brubaker wrote: > > I am trying to make a

unable to save object Django (2.0)

2018-01-23 Thread harsh sharma
i am trying to save the basic information about a person i have created a model form for it but i am unable to save the object (unable to update the database) here is my views file @login_required def dashboard(request): if request.method=="post": form = linkform(request.POST)

Re: 'WSGIRequest' object has no attribute 'user'

2018-01-14 Thread harsh sharma
thanks Etienne , The problem is solved On Monday, December 25, 2017 at 10:25:34 AM UTC+5:30, harsh sharma wrote: > > i am getting this error when ever i try to run localhost/admin > > > -- You received this message because you are subscribed to the Google Groups "

'WSGIRequest' object has no attribute 'user'

2017-12-24 Thread harsh sharma
i am getting this error when ever i try to run localhost/admin -- 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 django-users+unsubscr...@googlegroups.com. To

Re: models.py

2017-10-18 Thread harsh sharma
> > Best regards, > > Andréas > > 2017-10-18 10:13 GMT+02:00 harsh sharma <harshsha...@gmail.com > >: > >> what are the use of these function in models.py >> >> def __str__(self): >> return self.title >> >> and >> def get_abs

models.py

2017-10-18 Thread harsh sharma
what are the use of these function in models.py def __str__(self): return self.title and def get_absolute_url(self): return reverse('shop:product", agrs=[self.id,self,slug]) -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Can anyone help me in Template error?

2017-10-18 Thread harsh sharma
in your template folder -> account login.py to login .html .. if your html file is login.py and you have to specify full path like render(request,"accounts/login.html",context) On Saturday, October 14, 2017 at 3:19:53 PM UTC+5:30, utpalbr...@gmail.com wrote: > > my code that caused an

Re: need help in django application

2017-10-02 Thread harsh sharma
https://docs.djangoproject.com/en/1.11/topics/forms/ you can check this On Monday, October 2, 2017 at 4:55:14 PM UTC+5:30, djangor wrote: > > I m doing a project in django. I've created model classes for each form, > master tables and generated db tables from classes. Next for the >

django.core.exceptions.ImproperlyConfigured:

2017-10-01 Thread harsh sharma
i am getting this error whenever i m trying to run django-admin runserver django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must eit her define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing

django.urls.exceptions.NoReverseMatch: Reverse for 'index' not found. 'index' is not a valid view function or pattern name.

2017-09-27 Thread harsh sharma
i m a noob in django And i dont know why i am getting this error my views.py file: from django.shortcuts import render,render_to_response from django.http import HttpResponse from all.models import ALL from django.template import RequestContext # Create your views here. def home(request):

The view blog.views.create didn't return an HttpResponse object. It returned None instead.can any one help me this issue please nooob here

2017-09-11 Thread harsh sharma
here i m learning django and i m stuck on one thing the web page returning The view blog.views.create didn't return an HttpResponse object. It returned None instead. and here is my views.py file def home(request): story = Story.objects.all() return

Re: type object 'Story' has no attribute 'object'

2017-09-11 Thread harsh sharma
Thanks for helping -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to

type object 'Story' has no attribute 'object'

2017-09-11 Thread harsh sharma
why i m getting this error :-type object 'Story' has no attribute 'object' this is my views.py file: from django.shortcuts import render,render_to_response from django.http import HttpResponseRedirect from django.template import RequestContext from .models import * from django.http import