Antonis,
Well truth be told I'm with uwsgi only because of the snowball effect
you're alluding to, namely we have so many options I'm like looking
on-line for what the most popular and recommended one is, and uwsgi has
a huge fan base. As to server, I opted for lighttpd only because I
alread
Hey all!
I've posted my question to StackOverflow and asked in #django on freenode
but haven't gotten any responses, so I guess this mailing list is my next
stop.
https://stackoverflow.com/questions/45802068/why-does-case-when-ungroup-the-results-of-my-values-annotate-query
It appears when I i
I am creating a mindmap visio-like editor website using d3js and a bunch of
custom javascript. Rather than the schema/stencils being populated by
static JSON files, I wanted to create an administration area to edit the
schema without requiring JSON kung-fu skills and serve the dynamically
gene
Thanks for your replies.
I have looked at the other options available. While they are suitable for
version control, they're not well suited for queries where you want to see
the state of a given object at a given time. "Show me what X looked like on
Y date" can be useful, and shouldn't require
I have this code in my app view
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
@login_required(login_url="login/")
def home(request):
return render(request, "home.html")
Here also is my project url
from django.conf.urls import url, include
fr
If you want to do auditing of the database, I would look at packages available
for Django. This is the first I've read about "temporal tables," and my first
impression is that of grave concern.
Django-reversion is a popular package:
https://github.com/etianen/django-reversion
-Original Mes
On 12 September 2017 at 14:32, Andrew Hankinson
wrote:
> Hello,
>
> tl;dr I'm trying to implement 'temporal tables' [0] in Django with a
> Postgres backend, and I'm stuck on how to generate the appropriate SELECT
> ... FROM ONLY and UPDATE queries.
>
> The temporal tables pattern depends on having
If I may suggest a better approach:
- Make the code as ImageField does (see it's width_field and height_field)
- Then focus on writing the migration for this field
Unfortunately, I don't see a way for custom fields to provide hints to
the migrations framework. So a field that automatically create
That particular issue may be a lighttpd issue, but my question is more general.
Unfortunately I don't remember the kind of trouble I was having with uwsgi.
Are there any people who have used both uwsgi and gunicorn and have a preference
for the former? What benefits have they seen?
Antonis Christ
You're missing the fact that it's the scgi module of lighttpd is what
is causing it. uwsgi shouldn't fix it, as it has no idea if this is
intentional, for example when using mounts [1].
As can be seen in the WSGI spec, the WSGI client (uwsgi / gunicorn /
whathaveyou) should trust what is provided h
> Alas it's a tad complicated and I'll try and publish a module with the fix
> some time soon (it relates to lighttpd, uwsgi, django interactions and the
> management of SCRIPT_NAME and PATH_INFO environment variables which lighttpd
> doesn't do to Django's satisfaction and so it needs tweaking and
The issue didn't crop up, because there were no rows when you added
the field, so default isn't called. If you had existing data, then it
would've triggered.
What default should return for foreign keys is actually documented:
> For fields like ForeignKey that map to model instances, defaults shou
Okay, after much investigation, I found that the default value on this exact
field was actually a callable that returned an instance of DisplayName rather
than the pk. After changing that, the migrations ran successfully. I wonder
if Django could provide a better hint of such issues. It’s str
What's not clear about the error?
There are two admin classes that have invalid list_display_links values.
The format is documented:
https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display_links
And chances are you have:
list_display_links = (None,
Hey,
I am using python= 3.5 and
Django= 1.10.2
If I am running for the makemigrations --$ python3 manage.py
makemigrations
OR
Starting server -- $ python3 manage.py runserver 0.0.0.0:8000
Its returning errors for SystemCheckError
.../mydjangoproject# python3 manage.py makemigration
And to be complete:
from django.http.response import HttpResponseNotAllowed
# in create
else:
return HttpResponseNotAllowed(['get', 'post'])
On Tue, Sep 12, 2017 at 2:08 AM, Luis Zárate wrote:
> if request.method == "GET":
> if request.method == "POST":
>
> Uppercase is neede
try using pip: 'pip install uwsgi'
On Wed, Sep 13, 2017 at 11:35 AM, Dick Pan wrote:
> Hi,
>
> When I install uWSGI on cygwin by command: python2.7 uwsgiconfig.py
> --build
>
> one strange problem occur, undefined reference to `uuid_generate' on
> cygwin.
> but uuid.h exist in /usr/include/uuid
Well, the simplest answer is you used the python shell and not the
django shell via `python manage.py shell`.
The app not being in installed apps gives a slightly different error
and migrations have little to do with it as importing a model doesn't
hit the database.
So simply use `python manage.py
Hey Django users,
I'm building a quite large query set that makes use of subqueries and lots
of annotations. Here's the relevant part:
queryset = StockItem.objects \
.order_by() \
.annotate(available_stock_count=Subquery(stock_booking_count,
output_field=IntegerField())) \
.annotate(requi
Well, not a lot of insight from the broader community on this one, but a
warm thank you to Melvyn Sopacua who took the time to think about it a
bit and apply his experience which led me to:
/usr/local/lib/python3.5/dist-packages/django/urls/base.py
where I could instrument Django a bit and
On Tue, Sep 12, 2017 at 12:34:26AM -0700, gernot.c...@gmail.com wrote:
> Hi,
>
> I don't know if crossposting with stackoverflow is allowed here but
> essentially my problem is explained
> in
> https://stackoverflow.com/questions/46162104/django-dynamic-model-fields-and-migrations.
> What I wan
Did you include your app in the installed apps list in your settings.py
file?
Did you do the makemigration and migration after creating the model?
Check these two steps and then try again. That's what I'm suspecting given
the error trace.
On Sep 13, 2017 7:13 AM, "Abdul-Waris Dawuda" wrote:
>
Hi,
When I install uWSGI on cygwin by command: python2.7 uwsgiconfig.py --build
one strange problem occur, undefined reference to `uuid_generate' on cygwin.
but uuid.h exist in /usr/include/uuid/, and I checked GCC include path by
command: echo | gcc -v -x c++ -E -, it's ok.
At last, I have to
Hello Everyone
Am new to Django and am currently facing a problem trying to import a class
from my models.
i get this error when i try to do that from the Shell. I am using Visual
Studio. i get this problem when i run my command to import;
>>> from app.models import Artist
Traceback (most re
When i run this command in the django shell when am trying to make query to
my databse i get this problem. Kindly help me out:
>>>from app.models import Artist
Traceback (most recent call last):
File "", line 1, in
File ".\app\models.py", line 8, in
class Artist(models.Model):
File
"
First, make sure the field is rendered as an input tag with type
"email". If it's not, your Django version is out of date or you're
overriding the widget somewhere.
Second, read this:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#Validation
The standard pattern isn't good e
Thanks. I made it as needed and wrote simple JS to call popup if there is
an error to rise modal again after reload.
Thanks!
Dne úterý 12. září 2017 15:18:58 UTC+2 Daniel Roseman napsal(a):
>
>
> On Tuesday, 12 September 2017 14:18:29 UTC+1, Daniel Roseman wrote:
>>
>> On Tuesday, 12 September 2
Humor me and call it list_view in the pattern and template references.
--
Melvyn Sopacua
--
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
28 matches
Mail list logo