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, '

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

2018-03-26 Thread Mike Dewhirst
On 27/03/2018 3:09 PM, prince gosavi wrote: 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     href="{%static'mai

Re: How to understand below html code?

2018-03-26 Thread Lachlan Musicman
Utpal, it's not pure HTML. It's got some templating in there as well - Jinja2 I think is the default. Regardless, it reads like Python: if the list exists, open an unnumbered list for every question in the list, create a dot point with the list question. The list question will be a html a link ba

How to understand below html code?

2018-03-26 Thread Utpal Brahma
I am in tutorial 3 of Django.But i am stuck in understanding the below code.Please heLP me!!! {% if latest_question_list %} {% for question in latest_question_list %} {{ question.question_text }} {% endfor %} {% else %} No polls are available. {% endif %} -- You

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: writing to my django website via a separate application

2018-03-26 Thread Damon Branch
Hi Larry, Thanks for answering - yes that is what I mean I want a stand alone program to access the website server and database. You said you make 'python requests or instantiating one of my server's objects the same way a request from the browser would' - it's good to know that this can be done

Re: Advertising a new Django open source project?

2018-03-26 Thread 'Simon Connah' via Django users
Oh, good catch. I'll fix that tomorrow. Thanks. On Monday, 26 March 2018, 18:45:24 BST, Dylan Reinhold wrote: One thing I noticed. In your Blog model you are saving your slug every time. If you are using the slug as your URL this means if a title is changed the URL will change and an

Re: writing to my django website via a separate application

2018-03-26 Thread Larry Martell
On Mon, Mar 26, 2018 at 5:26 PM, Damon Branch wrote: > Hi, > I'm developing a website which contains a database. I then need to be able > to update that database from a separate python application like a desktop or > mobile app. > I am new to Django and fairly new to Python (few months). > After r

writing to my django website via a separate application

2018-03-26 Thread Damon Branch
Hi, I'm developing a website which contains a database. I then need to be able to update that database from a separate python application like a desktop or mobile app. I am new to Django and fairly new to Python (few months). After reading the introductory materials I'm thinking the way to do thi

Re: Django and graphs

2018-03-26 Thread Ryan Manzer
Personally, I have had a good deal of success building data APIs using Django Rest Framework and then consuming the data with the D3.js javascript library. However, I can understand that may be a bit more complicated than you wish to go. On Thursday, March 22, 2018 at 12:36:22 PM UTC-7, Mohsen

Re: survey form

2018-03-26 Thread sum abiut
i have build an app that allow the admin to add survey title, question and choices. I needed assistance display all the questions and answer in front end to allow the users to take the survey. can i do that with a form. needed directions. my models.py class Survey(models.Model): title = mode

Re: Having ERROR running Django project !!!

2018-03-26 Thread Julio Biason
Hi Jamaldin, Kinda hard to help you here, because there is a lot of information lacking. Like, do you see any errors on your logs? Are you running in dev environment (like in `python manage.py runserver`) or are you running with a webserver (nginx) in front of it? Are you using wsgi/gunicorn/any-o

Having ERROR running Django project !!!

2018-03-26 Thread Jamaldin Pro
Hello I was creating a Djnago project and when I finish it, it was working perfectly but when I start adding ("name"/"text"/"information") to models from admin page, It stops working I mean after adding I can't open my home page. *If I will try to open it, it auto downloads unknown file*. *I NE

Re: Advertising a new Django open source project?

2018-03-26 Thread Dylan Reinhold
One thing I noticed. In your Blog model you are saving your slug every time. If you are using the slug as your URL this means if a title is changed the URL will change and anyone who had the original URL will get a 404. Probably not want you want. Dylan On Mon, Mar 26, 2018 at 10:33 AM, 'Simon

Re: Advertising a new Django open source project?

2018-03-26 Thread 'Simon Connah' via Django users
Well, I've opened up the repository if anyone is interested in taking a look. As I've said elsewhere, it is very early in development, but I have a couple of weeks where I should be able to dedicate a decent amount of time to get it working properly. The main thing I'm a bit worried about is th

Re: Django Channels 2 poor performance and high CPU usage

2018-03-26 Thread Andrew Godwin
(You double-posted this so I'm just going to reply to this one) I need to know a bit more information about what the slowdown is - in particular: * Have you run with PYTHONASYNCIODEBUG=1 set as an environment variable to check for non-yielding coroutines? * What sort of messages per second are we

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 > the frontend is don

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

2018-03-26 Thread zubair alam
One solution would be as following: 1. Let Java EE application consume the Rest API provided by Django (using DRF library which uses Django Models, its own serializers and viewsets). 2. You have to maintain a mapping of services and views provided by Java EE application with Djan

Re: How to combine a custom date and time field in Django?

2018-03-26 Thread hunter.cur...@gmail.com
Using database time functions is a bit of a hassle since each database seems to have its own syntax for these types. If you are using MySQL, the function you are calling will only return a DATE field, in this case you want to use TIMESTAMP with the parameters all combined in a single text string

Re: Updating TimeField in forms/formsets returns value without microseconds

2018-03-26 Thread Tim Graham
You need to set support_microseconds=True on the widget. https://docs.djangoproject.com/en/stable/ref/forms/widgets/#django.forms.Widget.supports_microseconds On Sunday, March 25, 2018 at 9:03:18 AM UTC-4, Rafał Szymczuk wrote: > > I have problem with updating TimeField in my models - when I want

Django Channels 2 poor performance and high CPU usage

2018-03-26 Thread James
I'm using Channels 2 to build a shared 3D model viewing tool, but I'm running into performance issues where Channels can't keep up and uses 100% of a single core. This results in clients just receiving a slow trickle of messages rather than the fast stream I was expecting. I ended up stripping

Channels 2 performance issues

2018-03-26 Thread James Foley
I'm using Channels 2 to build a real time 3D model viewing app where all users can rotate and view a model. I'm having to send quite a bit of data (roughly one message every 20ms) and I've run into some performance issues. Daphne seems to just sit at 100% on a single core causing the messages to

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

2018-03-26 Thread Jason
Or have the servelet call the django api endpoints and incorporate the data before rendering the html response -- 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 d