Incorrect syntax used
Correction
Views.py:
from .models import Topic
def index(request):
"""the homepage for the homepage"""
return render(request, 'homepage/index.html', name="something")
Base.html:
main
Follow the same process for every view and template
Sent via the BlackBerry
That post is outdated (it's not for Chanels 2), you nginx.conf is wrong, ws
isn't location, it's protocol so you web sockets connections are forwarded
to unix://myproject/experiment_platform.sock; and this triggers your error
You just need forward all connections to daphne (except /static)
--
I am trying to use a django admin datepicker in a custom form. it is
displaying alright but the year only begin in 2018 but no later than 2018.
Please assist, below is my form.py
#my form.py
from django.forms.extras.widgets import SelectDateWidgetclass
ContactForm(forms.ModelForm):
class Meta:
Thanks for your information!
I just did all the configurations again following this post(
http://masnun.rocks/2016/11/02/deploying-django-channels-using-daphne/).
And I think it is extremely useful for me and my website is now running.
And you are right, I don't need both uwsgi and daphne. Only da
Again, websocket is different from HTTP, both are built on TCP. So Nginx
preoxy_pass is for HTTP forward, so you can not use it for HTTP for
tanspond.
Maybe remove location /ws would work. Just use daphne as ws server.
Spend some time reading the docs:
https://channels.readthedocs.io/en/latest/de
Can you format your code or post it on a gist?
On Wed, Jun 27, 2018 at 00:17 wrote:
> Hi all :-)
>
> I'd like to archive some data.
>
> I did that :
>
> class AbstractDataModel(models.Model):
>
> xxx
>
>
> class Meta:
> abstract = True
>
>
> def __iter__(self):
>
> return iter([se
Hey Kirby,
Any ideas on where I should take this next? Thanks
On Thursday, June 21, 2018 at 10:12:41 AM UTC-6, C. Kirby wrote:
>
> Ok, this is good to work with. Let us tackle this issue by issue. The
> first issue is that your modal is not showing up. I see several possible
> issues:
>
> Repl
I think I must have messed the ports up. Here is a summary:
redis: 6379
daphne: 8000 (if running daphne with this command: daphne
experiment_platform.asgi:channel_layer --port 8000 --bind 0.0.0.0 -v2 &)
ws (see *nginx.conf*): 8000 [I guess the error message in the browser
console "WebSocket
Thanks,
Here is my view.py and it works for me
def display_data(request,id):
selected_objects = minutes.objects.filter(pk__in=id)
return render(request,'test.html',locals())
cheers,
On Wed, Jun 27, 2018 at 8:15 AM, Ryan Nowakowski
wrote:
> On Tue, Jun 26, 2018 at 04:33:41PM +1100, sum
On Tue, Jun 26, 2018 at 04:33:41PM +1100, sum abiut wrote:
> Hi,
> i need some assistance, i have a table and want to be able to only display
> the values of a particular row when ever the particular row is selected.
>
> please point me to right direction.
>
I assume you're talking about an HTML
ok, and that has nothing to do with what I mentioned in my original
response.
this has nothing to do with your templates and how they're structured. it
has everything to do with the way your urls are defined
On Tuesday, June 26, 2018 at 10:38:15 AM UTC-4, Tim Vogt wrote:
>
> I am building my d
I would suggest you read on how python imports work
https://docs.python.org/3/tutorial/modules.html#more-on-modules
On Tuesday, June 26, 2018 at 12:07:45 PM UTC-4, john speny wrote:
>
> How do you import a class I have created, from forms. Py in the cart app
> to views. Py in the shop app
>
--
>
> you can use bitbucket or something similar for project sharing
>
there is an example of template directory settings -
https://bitbucket.org/voron-raven/games/src/3fa65824be0d7fed2f8042ca189a3039ef016f28/games/settings.py#lines-102
--
You received this message because you are subscribed t
Error typo, I creates a new thread with the good description ;-)
Le mardi 26 juin 2018 16:35:27 UTC+2, Nelson Varela a écrit :
>
> The following class is kinda weird:
> class DataModel(DataModel):
>
> A class which inherits itself???
>
>
>
> On Tuesday, June 26, 2018 at 11:31:24 AM UTC+2, mickae..
Hi all :-)
I'd like to archive some data.
I did that :
class AbstractDataModel(models.Model):
xxx
class Meta:
abstract = True
def __iter__(self):
return iter([self.xxx, self.yyy, self.zzz, self.aaa,
self.qqq, self.mode_bbb])
class DataModel(AbstractDataModel):
you could try to create "blog" directory in your templates folder and put
the date.html in there...
not sure thou as I am very beginner ;)
On Tuesday, 26 June 2018 12:02:45 UTC+2, emmanuel wyckens wrote:
>
> Hello,
>
> I didn't solve my issue on adding the templates directories in setting.py.
>
I am building my django app from base.html and with child themes
and get these errors:
any help woud be appreciated.
Tim
NoReverseMatch at /
' homepage' is not a registered namespace
Request Method: GET
Request URL:http://localhost:8000/
Django Version: 2.0.6
Exception Type: NoReverseMatch
The following class is kinda weird:
class DataModel(DataModel):
A class which inherits itself???
On Tuesday, June 26, 2018 at 11:31:24 AM UTC+2, mickae...@gmail.com wrote:
>
> Hi all :-)
>
> I'd like to archive some data.
>
> I did that :
>
> class AbstractDataModel(models.Model):
> xxx
>
> cla
I would suggest you look at the object relational model section of the
tutorial. And then browse the documentation for model references,
relationships and lookups. Quite frankly, everything you're asking here is
covered in detail there.
On Tuesday, June 26, 2018 at 8:27:22 AM UTC-4, Pravin Ya
Hello Everyone,
*I want to make INNER JOIN Query Or JOIN Query with "Video" and "*
*Thumbimages**". Kindly let me know.*
*Below my Models:-*
*from __future__ import unicode_literals*
*from django.db import models*
*from django.utils import timezone*
*from django.template.defaultfilters import s
Hello,
I didn't solve my issue on adding the templates directories in setting.py.
I always the same error :
See my project in zip file
Thanks in advance
Emmanuel
TemplateDoesNotExist at /blog/date
blog/date.html
Request Method: GET
Request URL: http://127.0.0.1:8000/blog/date
Django Vers
Hi all :-)
I'd like to archive some data.
I did that :
class AbstractDataModel(models.Model):
xxx
class Meta:
abstract = True
def __iter__(self):
return iter([self.xxx, self.yyy, self.zzz, self.aaa,
self.qqq, self.mode_bbb])
class DataModel(DataModel):
pass
c
Hi community :)
I'd like to implement something like "joined image".
In Database, I'd like CoreObject to have the key of "Object1" OR "Object2"
OR "Object3" (like foreignKey).
How can I do that ?
The context is that CoreObject is a central DataBaseFile and will receive
information from one of
*template:*
{% extends "posts/post_base.html" %}
{% load bootstrap3 %}
{% block post_content %}
{% if not form.instance.pk %}
Create Post
{% else %}
Update Post
{% endif %}
{% csrf_token %}
{% bootstrap_form form %}
{% endblock %}
On Monday, 25 June 2018 23:47:07 UTC+5, alex eckert wrote:
>
24 matches
Mail list logo