Initializing DateTimeField in django forms.

2018-02-19 Thread prince gosavi
Hi, I am building a simple django application for user feedback. And I have created a form for that purpose. Here is the snippet: # my_app/forms.py from django import forms import datetime class UserQueryForm(forms.Form): date = forms.DateField(initial=datetime.date.today) # need help u

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread prince gosavi
x27;contact_info': get_mobile_nos, 'req_date': get_datetime} return render(request, 'userinfo/information.html', context) else: form = UserQueryForm() return render(request, 'userinfo/form.html',{ 'form': form }) On Monday,

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread prince gosavi
That did the job.But I would like to get rid of the 'Field' type view that surrounds the date. As I only want to display the date. Is there a way to do it in the form itself or any way to change it in the templates? On Monday, February 19, 2018 at 7:52:05 PM UTC+5:30, prince go

Integrating Java(web servlets) into django as front end.

2018-03-25 Thread prince gosavi
Hi, I am working on a project where the framework used is django and most of the frontend is done in java. I need a way to integrate both of them so that my system works. Converting java code to python is not an option.As I do not have time to start learning Java now. Any help is appreciated.

Re: Integrating Java(web servlets) into django as front end.

2018-03-25 Thread prince gosavi
They return html pages as ouput On Monday, March 26, 2018 at 12:42:59 AM UTC+5:30, Cictani wrote: > > What do these servlet output? Html, Json, xml? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Integrating Java(web servlets) into django as front end.

2018-03-25 Thread prince gosavi
I want to use the data from the models and then display it using the html from servlet. On Monday, March 26, 2018 at 12:54:54 AM UTC+5:30, Cictani wrote: > > And they should be displayed as they are generated or do you need a > different design? > -- You received this message because you are s

Re: Integrating Java(web servlets) into django as front end.

2018-03-26 Thread prince gosavi
Ok thanks for the suggestions I will try them all and see which fits my requirements and provide a feedback. Regards On Monday, March 26, 2018 at 12:03:28 AM UTC+5:30, prince gosavi wrote: > > Hi, > > I am working on a project where the framework used is django and most of >

Adding seperate static css file for other extended templates.

2018-03-26 Thread prince gosavi
I am working on a project where I need to have different styles for different templates. I have a base.html template which gets extended in other templates. Following is the snippet: base.html {% load static %} Recommendation {% block css%} {% endblock%}

Re: Adding seperate static css file for other extended templates.

2018-03-26 Thread prince gosavi
Thanks for the reply but it is not working for me. When i check the page source of the loaded page the 'query.css' is not loaded. Is it because of the urls? or path? or something else. here is my static settings: settings.py STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, '

Decoupling Postgres database credentials in django for deployment.

2018-03-29 Thread prince gosavi
Hi, I have made a django project and want to deploy it on cloud. Before that i want to decouple all the private information. I want to decouple the database info too, like the username password etc. Any help is appreciated. -- You received this message because you are subscribed to the Google Gro

Re: New to Django, Tutiorial01 not working,

2018-03-29 Thread prince gosavi
You need to use the following url *http://localhost:8000/polls/* as you have mentioned that you want to go under the "polls/" django parses through the urls to find "/polls/" and if it does not exists it will surely give an error as you are requesting things that it does not have. On Friday, Ma

Error H10 while deploying Django project

2018-04-02 Thread prince gosavi
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=miniprojectcc.herokuapp.com dyno= connect= service= status=503 bytes= protocol=http ^C(miniproject-wxhZ76U4) heroku ps -a miniprojectcc Free dyno hours quota remaining this month: 549h 30m (99%) === web (Free): gunic