Re: Redesign of agricultural project with python django and next.js technologies.

2024-02-19 Thread Dan
I'm Interested. My WhatsApp number is +2205192833. On Sunday, February 18, 2024 at 10:48:48 AM UTC-6 Jorge Bueno wrote: > The project: > > I am working on an exciting project that I think you may be interested in. > It is an online marketplace, similar to the US farmers and livestock >

Re: django multi databases and multi sessions

2023-03-20 Thread Dan Wood
I’m working on a big multi tenant app feel free to email for information, I use a different schema for each tenant -- 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

uvicorn and ASGI

2022-06-05 Thread Dan Davis
/uvicorn/ and it is curious that the advise is to run uvicorn as a work rather than a full ASGI server. Can someone explain why this is necessary or better? Thanks, -Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Update to Tutorial 4 - Generic Views

2022-03-11 Thread Dan Cox
general documentation on Views) everything worked. Cheers, Dan. -- 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...@google

Re: Periodic Execution of django functions or tasks

2022-03-07 Thread Dan Davis
If celery is too much, consider django-background-tasks. To be totally honest, I am an old dog, and I generally do the following: * Write a management command. * Deploy a crontab to run my management command. This is not so container or cloud friendly, but none of my cloud deployments run

Re: Wrapping dbshell and invoking procedures and such

2021-10-22 Thread Dan Davis
This will allow me to have my Django management commands act as wrappers for the SQL stored procedures. On Friday, October 22, 2021 at 6:58:04 PM UTC-4 Dan Davis wrote: > I've succeeded over the last few years in creating a Django app that > everyone likes that uses a "tip of the iceberg&q

Wrapping dbshell and invoking procedures and such

2021-10-22 Thread Dan Davis
I've succeeded over the last few years in creating a Django app that everyone likes that uses a "tip of the iceberg" out of a 20 year old database. Now I've inherited the SQL development as well, and I want to cleanup and move towards more Django. There are lots of small, non-DRY scripts run

dumpdata - output file not compressed

2021-08-14 Thread Dan Jacob
The dumpdata command does not appear to be doing any compression. This is using Django 3.2.6 running in a Docker container with the python:3.9.6-buster image. Given the command > ./manage.py dumpdata myapp.MyModel -o myfixture.json.gz --traceback I would expect the file myfixture.json.gz

How to create a user to user message system using Django Rest frame work

2021-03-14 Thread DAN DIGNITY
I am trying to create a private messaging system using the Django Rest framework. It doesn't have to be like a live chat, just have an inbox and be able to respond, a simple thing like that. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Scaling dumpdata and loaddata

2020-10-22 Thread Dan Davis
I have found an answer of sorts in a previous thread. Fred says: > Just for the follow-up, I ended up using pgloader and after some argument tweaking, it worked. Cheers. On Thursday, October 22, 2020 at 6:48:57 PM UTC-4 Dan Davis wrote: > dumpdata and loaddata work for me on some s

Scaling dumpdata and loaddata

2020-10-22 Thread Dan Davis
dumpdata and loaddata work for me on some smaller applications, but I am wondering whether any of you have strategies to scale it up to more data. My DevOps doesn't really give developers access to much - not even RDS snapshots. The larger applications have written some logic to move data,

Expire session after N minutes of inactivity

2020-07-14 Thread Dan Davis
Does anyone know of a django pypi package that implements something like this so that I can steal the code? I know I need to think about "what does inactivity mean" in the era of SPA and Ajax, but a module could save me some time. -- You received this message because you are subscribed to

Re: connection queries_log when DEBUG is False

2020-07-08 Thread Dan Davis
() signals.request_started.connect(reset_queries) On Wednesday, July 8, 2020 at 7:03:48 PM UTC-4, Dan Davis wrote: > > This has to do with Django internals, but is nonetheless a user question. > > Various packages force_debug_cursor as illustrated in > https://www.webucator.c

connection queries_log when DEBUG is False

2020-07-08 Thread Dan Davis
after each request, or only if the connection is cleaned up? Thanks, anyone, -Dan -- 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-user

Re: POSTGRES CONNTECTION TIMEOUT WHEN USING AN API

2020-07-06 Thread Dan Madere
the timeout. Dan On Monday, July 6, 2020 at 9:24:48 AM UTC-4 sunne...@gmail.com wrote: > I get this error from my postgresql log also : could not send data to > client: Broken pipe > *AJAYI Sunday * > (+234) 806 771 5394 <+234%20806%20771%205394> > *sunne...@gmail.com* > &

Re: Django ContentTypes required?

2020-07-06 Thread Dan Madere
, and if INSTALLED_APPS contains what you expect. Dan On Monday, July 6, 2020 at 2:33:19 PM UTC-4 jzt...@gmail.com wrote: > Hello, > > I am not using any of the ContentType relations, etc right now in my > Django 2.12 Python 3.6 application, am I able to run the application >

Re: Django queryset filtering

2020-06-26 Thread Dan Madere
I'd make two queries. One to see which businesses currently have active licenses, then a second to get the expired licenses, excluding the businesses from the first query. Here's some example code, assuming the LicenseIssue model has a "business" foreign key field: *active_business_ids =

Re: Symmetrical, Self-referencing ManyToManyField with Through Table

2020-06-25 Thread Dan Madere
I don't know of a way to configure the admin do that, but one solution would be to use signals to notice when one-way records are created, then automatically create the record for reverse relationship. We need to notice when records are deleted as well. This approach would allow showing one

Re: Symmetrical, Self-referencing ManyToManyField with Through Table

2020-06-25 Thread Dan Madere
I tried out the example code, and can replicate this. What's interesting is that if I try removing the ContactConnection model, and the "through" attribute, this allows Django to create the intermediate table on its own, and then your get_connections() method works as expected! It seems like

Re: Updating the concept of Django

2020-06-15 Thread Dan Davis
Since Django is written in Python, you should know enough Python to understand it do really good code. If you are well versed in other computer languages, I recommend the book Fluent Python. It is not for newbies to programming however. I find the Django Tutorial from the project itself,

Path parameters and security scanners best practice

2020-06-15 Thread Dan Davis
of security problem (it isn't very smart). Is there an option I can give to Django to say that if an URL pattern matches but the path parameter does not match, it should return a different sort of 400 error? Thanks, -Dan -- You received this message because you are subscribed to the Google

Re: Django-React with webpack or create-react-app

2020-03-09 Thread Dan Davis
If you wish to use cache busting, or create-react-app sets that up by default, you can configure some special logic for loading the bundles. Mine is per-process based, and assumes that since the bundle will be cached, it reasonable not to create a new static file loader:

CONN_MAX_AGE and Oracle

2020-03-09 Thread Dan Davis
One or my power users claims that CONN_MAX_AGE is not working properly with Oracle. I've written a minimal backend to wrap the standard Oracle backend, and to log connection creation. I am seeing multiple connections sometimes in the same second with a CONN_MAX_AGE of 300. I am currently

AdminEmailHandler logging filter, formatting, and false positives

2020-01-16 Thread Dan Davis
development cycles. Maybe there is an existing Django package that already addresses these issues?Maybe others have home grown solutions they can propose? Thanks in advance, -Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: Making tests fast

2019-09-03 Thread Dan Davis
I will just use fixtures, natural-keys, and an in-memory database. -- 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

Making tests fast

2019-09-03 Thread Dan Davis
I'm wondering how to make my tests fast while also having a lot of data defined in the models. This project is already using sqlite3 and the tests are single-threaded. My ideas are: - Specify a different sqlite3 file and keepdb for different tests - presumably with @override_settings

Re: Channels: launching a custom co-routine from SyncConsumer

2019-08-28 Thread Dan Merillat
On 8/15/19 11:10 PM, Andrew Godwin wrote: > SyncConsumer isn't async - it runs inside a separate synchronous thread. > You'll need to get the event loop from the other thread and use > call_soon_threadsafe instead! Sorry for the delay in getting back to you, it took me a while to go through the

Channels: launching a custom co-routine from SyncConsumer

2019-08-14 Thread Dan Merillat
I have an application that's 99% using the ORM and database work so it is using SyncConsumer. However, I have one minor part that needs to use a timer, and I cannot get it to work for the life of me. In an AsyncConsumer, I can use asyncio.ensure_future(self.coroutine()) to start a timer. In

Re: Docker: NGINX, Postgres, Django, Static, Media Files

2019-07-14 Thread Dan Tagg
+1 for cookiecutter On Sun, 14 Jul 2019 at 20:53, hunter.cur...@gmail.com < hunter.cur...@gmail.com> wrote: > Probably the easiest way to do what you are looking for is to use > cookiecutter-django: https://github.com/pydanny/cookiecutter-django > > They are now using Caddy for the web server

Re: Package that helps update only changed fields

2019-06-24 Thread Dan Davis
Thanks, I wrote a mixin class for most of my forms that works a lot like this, although it combines self.changed_fields and self.model._meta.fields to discover which fields to update, rather than the two stages you have above. I discovered when trying to generalize this mixin that some of my

Re: architecture for Blue/Green deployments

2019-06-24 Thread Dan Davis
A related discussion on django-developers has turned up this module, written by one of the participants in the discussion there: https://github.com/aspiredu/django-safemigrate >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: call a view several times in another view

2019-06-18 Thread Dan Davis
I don't think it is a a good idea to call a view from another view, but if you have an underlying function that used to be a view, and you want to call it to do the secondmethod, then that's a good way to begin to do more with Django. Another good way is to practice using the generic

Re: Saving OnetoOne Field

2019-06-18 Thread Dan Davis
Shreejith Unnikrishnan Nair, Is this in a ModelForm or the intsance itself? That would help to give guidance... On Tuesday, June 18, 2019 at 11:40:53 AM UTC-4, Lutalo Bbosa joseph wrote: > > A foreignKey with aunique attribute is same as using a OnetoOneField so > either can suit your

Package that helps update only changed fields

2019-06-18 Thread Dan Davis
to do only a limited update. Thanks, -Dan -- 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 g

Re: My developers have run amok

2019-06-05 Thread Dan Davis
> > Are you sure? > My (possibly flawed) understanding is that if you can make the change in > a single transaction, no-one else can see what is happening until it is > committed. Effectively that would be an instantaneous change. > Depending on your data architecture you might need to make some

Re: My developers have run amok

2019-05-22 Thread Dan Davis
Sure - setting it up is easy. There are hard questions about database mutations however. If you drop column bar from table Fubar, then the old code is still querying for buth Fu and Bar: SELECT id, fu, bar FROM fubar On-premise, this is the case for maybe 10 seconds, tops. In the

Question on logging best practices and ALLOWED_HOST

2019-05-22 Thread Dan Davis
*First Question - How valuable is the check on ALLOWED_HOST? * How many folks out there simply have settings: ALLOWED_HOSTS = ['*'] *Second Question - What is the best practice for enriching the log record?* On-premise, we've struggled with the interaction of the AdminEmailHandler and

Oracle ORA-03124 Two-task internal error

2019-05-08 Thread Dan Davis
Running my migrations with Django 1.11. (1.11.20), fails with the Oracle error ORA-03124 Two-task internal error. I have tried this with Oracle instantclient 12.1.0.1 and 18.5.0.0., and several other versions of cx_Oracle. There are no migrations to make, but I get the following error, always

Re: Autoreloader looping Django 2.2

2019-05-01 Thread Dan
Hi Ramiro Thanks for answering. Tried stable 2.2.1 and it looks like it is working ok now. The folder is a virtualbox shared folder, shared from an osx host. Thanks for your help! On Tuesday, April 30, 2019 at 12:33:58 AM UTC+2, Ramiro Morales wrote: > > Hi Dan, > > On Fri, Apr 26

Re: Autoreloader looping Django 2.2

2019-04-26 Thread Dan
Forgot to mention that this is on a mac osx host with ubuntu 16 virtualbox guest, I'm not sure that has something to do with it? On Thursday, April 25, 2019 at 10:06:59 PM UTC+2, Dan wrote: > > I'm using Django 2.2 on a new project and suddenly the autoreloader is > looping when I chan

Autoreloader looping Django 2.2

2019-04-25 Thread Dan
I'm using Django 2.2 on a new project and suddenly the autoreloader is looping when I change a file DEBUG: /urls.py. is_changed: False, is_new: True /urls.py previous mtime: None, current mtime: 1556221457.0 /urls.py notified as changed. Signal results: [(, None)]. /urls.py changed,

Re: My developers have run amok

2019-03-04 Thread Dan Davis
; rather look > to extract specific fields that you know you want to display/access. I > would imagine that the only time you are going to want to retrieve that > BLOB (assuming you stick to your current design) is per individual record > "on request". > > > On Wednes

Re: Max function and grouping with Oracle

2019-02-26 Thread Dan Davis
> That is not the case on MySQL and PostgreSQL for. example. +1 Insightful. I'm still trying to get my Ops guys to let us drop and re-create databases for Postgres/MySQL. They are very afraid to give that permission because they worry about production databases, and it is hard for them to

Re: My developers have run amok

2019-02-26 Thread Dan Davis
For the group, the eventual culprit was not complicated. It is a model with a BinaryField that holds a file's contents. The Django documentation advises against this, but why? Well, on-premise with big-iron database like Oracle, storing the file in the database is attractive. So, what's

Re: Is Django logging multi-process safe?

2019-02-26 Thread Dan Davis
So, there are some issues in managing the files. It is not very 12-factor to have the application worry about such things. The issues with using a FileHandler or TimedRotatingFileHandler from multiple processes/kernel threads are less important, but still exist. If a file is append-only,

Re: django command logging levels

2019-02-15 Thread Dan Davis
The common verbosity will be passed to the handler: class Command(BaseCommand): ... def handler(**kwargs): verbosity = kwargs['verbosity'] I tried to get clever once and not have **kwargs, but Django sends that common stuff, like '--settings", and it is good for me to pay

Re: Preparing for 2.2LTS - testing for Deprecation Warnings

2019-01-17 Thread Dan Davis
I will then try like this in my manage.py: if len(sys.argv)>1 and sys.argv[1] = 'test': warnings.filterwarnings(...) Thanks, -Dan On Thu, Jan 17, 2019 at 1:08 PM Simon Charette wrote: > You can use the category kwarg of filterwarnings[0] to pass the Django > de

Re: Django 2.2 alpha 1 released

2019-01-17 Thread Dan Davis
Now I see it... On Thursday, January 17, 2019 at 11:31:24 AM UTC-5, Dan Davis wrote: > > Great - I want to add it to some tox tests that I only run on demand. It > isn't yet on pypi, right? > > On Thursday, January 17, 2019 at 10:40:21 AM UTC-5, Carlton Gibson wrote: >> &g

Re: Django 2.2 alpha 1 released

2019-01-17 Thread Dan Davis
Great - I want to add it to some tox tests that I only run on demand. It isn't yet on pypi, right? On Thursday, January 17, 2019 at 10:40:21 AM UTC-5, Carlton Gibson wrote: > > We've made the first release on the way to Django's next major > release, Django 2.2! > > With about two and a half

Preparing for 2.2LTS - testing for Deprecation Warnings

2019-01-17 Thread Dan Davis
PYTHONWARNINGS=error is too much. How can I call warnings.filterwarnings() to make all *Django* DeprecationWarnings into errors? -- 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,

Re: Is Django logging multi-process safe?

2018-12-21 Thread Dan Davis
t to. > > > Regards > > > Eric > > > -- > *From:* django-users@googlegroups.com on > behalf of Dan Davis > *Sent:* Friday, December 21, 2018 5:55:35 PM > *To:* Django users > *Subject:* Re: Is Django logging multi-process safe? > > Looks like I should us

Re: Is Django logging multi-process safe?

2018-12-21 Thread Dan Davis
Looks like I should use a WatchedFileHandler and then have logrotate do the logging. If the file pointer is moved by another process, then it will work. Does gunicorn patch this for me? Will I be better off using syslog or something? On Friday, December 21, 2018 at 11:51:16 AM UTC-5, Dan

Is Django logging multi-process safe?

2018-12-21 Thread Dan Davis
I just came across this: https://docs.python.org/3.5/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes This suggests that log messages sent to a StreamHandler will be processed properly, but log messages sent to a standard logging.handlers.TimedRotatingFileHandler

Re: Max function and grouping with Oracle

2018-11-26 Thread Dan Davis
Looks like there is no problem here. Django groups by whatever is in the query, so that this would be done as follows: Parent.objects.values('id').annotate(child_updated_timestamp=models.Max('child_updated_timestamp')) On Monday, November 26, 2018 at 12:32:09 PM UTC-5, Dan Davis wrote

Max function and grouping with Oracle

2018-11-26 Thread Dan Davis
this and how to constrain the GROUP BY? Thanks, -Dan -- 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.co

Checking for reference leaks

2018-11-09 Thread Dan Davis
So, my application apparently is the largest on our Django servers. This doesn't mean that a reference leak exists, but it could mean that a reference leak exists. I've been trying to find some generalizable way to search for such a problem. I have difficulties drawing help from within the

Re: My developers have run amok

2018-11-06 Thread Dan Davis
This will likely do it - tracking as a django middleware, I suspect too much will still be lazy: https://pypi.org/project/wsgi-objgraph/ On Tue, Nov 6, 2018 at 6:39 PM Dan Davis wrote: > I am less certain this is the problem now. It may simply be that my > project is one of the

Re: My developers have run amok

2018-11-06 Thread Dan Davis
I am less certain this is the problem now. It may simply be that my project is one of the larger on the server. I did a quick audit, and although they are new to django, they either used connection.cursor() as a context manager, or called close explicitly. I will try to develop a middleware

Re: My developers have run amok

2018-11-06 Thread Dan Davis
On Tuesday, November 6, 2018 at 2:32:52 PM UTC-5, Jason wrote: > > refactor to use the ORM for those bits? and implement a team styleguide > that says no direct connections unless its proven to work better? > I'm looking to identify the memory consuming bits to allow refactor. Not a bad

My developers have run amok

2018-11-06 Thread Dan Davis
My developers, who have come from ColdFusion, are fond of this: cursor = connection.cursor() cursor.execute() data = [r for r in cursor] return render(request, some_template_name, {'data': data}) The problem with this is that the database cursor reference will be leaked. How do I integrate

Re: Left outer join rather than subquery.

2018-11-02 Thread Dan Davis
rysets/#django.db.models.FilteredRelation The uniqueness constraint is actually already there in my actual model, and Django supports that through unique_together = ('journal', 'issn_type'). On Tuesday, October 30, 2018 at 2:05:58 PM UTC-4, Dan Davis wrote: > > > Suppose you have a setup like this:

Re: Using django on kubernetes

2018-11-01 Thread Dan Davis
onfiguration involves multi-nodes load balancing. > > > Eric > -- > *From:* django...@googlegroups.com < > django...@googlegroups.com > on behalf of Dan Davis < > dans...@gmail.com > > *Sent:* Tuesday, October 30, 2018 6:56:32 PM > *To:* Django user

Left outer join rather than subquery.

2018-10-30 Thread Dan Davis
from Issn to Journal to make sure a constraint is added at the database level and get easier querysets? Thanks, -Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Re: Using django on kubernetes

2018-10-30 Thread Dan Davis
Andreas, I don't know terribly much about Kubernetes, only Docker, however it seems that Kubernetes must natively provide some metrics collection, i.e https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/. It would be nice to correlate particular views and

Handling Database Tables without a unique column

2018-10-29 Thread Dan Davis
I am currently leading a team handling a 16 year old database filled with junk. I think it has existed since its HTML application was served by Oracle forms. We are in production with Django, and turning off the more recent ColdFusion version this Thursday. However, some of our ways of

Re: tests pass individually but fail together

2018-07-05 Thread Dan Tagg
Hi Heather, What is it you are testing? I have had issues with this kind of thing when testing forms that are programatically changing dropdown list / default values. Dan On 5 July 2018 at 14:24, wrote: > Hello, I'm simplifying a previous post. I just started using Django a few > mont

Re: post_save signal is not dispatched

2018-06-24 Thread Dan Tagg
Hi, Weirdly, I've just been doing this. What do you have in your settings INSTALLED_APPS? One of them should be something like 'employer.apps.EmployerConfig' alternatively in your employer module's __init__.py file you need to say default_app_config = 'employer.apps.EmployerConfig' Dan On 24

Re: Run server

2018-06-22 Thread Dan Nepejchal
Hi, you forgot set up your databse. Here is some documentation https://docs.djangoproject.com/en/2.0/ref/databases/ Dne pá, 22. 6. 2018 18:01 uživatel Quiosa Evaristo < evaris...@una.adventist.org> napsal: > > Hello! > > I am learning python, I have installed it in my computer it is running >

Re: Need to Add One Or More Fields in Signup

2018-06-11 Thread Dan Nepejchal
Hi, I think you must define your own user model, with inherit from django user model... class User(AbstractUser): bio = models.TextField(max_length=500, blank=True) location = models.CharField(max_length=30, blank=True) birth_date = models. DateField(null=True, blank=True) and settings:

Re: responsive html

2018-06-08 Thread Dan Nepejchal
Hi, so if I understand it right you can use django template https://docs.djangoproject.com/en/2.0/topics/templates/ and use your css media query, then check how to serve static files https://docs.djangoproject.com/en/2.0/howto/static-files/ sou about css is in basic nothing change. pá 8. 6. 2018

Re: A calendar booking app

2018-06-05 Thread Dan Tagg
I'm looking for the same thing Kasper -- Django based not PHP. Dan On 5 June 2018 at 13:32, Kasper Laudrup wrote: > Hi fellow Django users, > > I'm planning to start up a homepage for my familys summer house. > > There are a few ideas of what should be there, user management, p

Re: Making an object unsaveable ...

2018-03-04 Thread Dan Tagg
Two possibilities spring to mind 1. Don't grant django's database user the right to update the relevant table. If you take this approach you'll need to catch any errors if anyone writes code to attempt to do this 2. Use signals to catch any save attempts. This is easily circumvented. On 4 March

Re: Model Design Questions

2017-12-16 Thread Dan Tagg
If you switched to Postgres you could use a json data type or dictionary data type. Django 1.11 onwards supports the storage and retrieval of both types I believe. Dan On Sun, 17 Dec 2017 at 07:46, Mark Phillips <m...@phillipsmarketing.biz> wrote: > I am building an electronic

Re: How do I make my form send a POST request to a specified view?

2017-11-23 Thread Dan Tagg
You need an "action" attribute to your form https://www.w3schools.com/tags/att_form_action.asp On 23 November 2017 at 22:12, Tom Tanner wrote: > My page has a registration form at `"/login_register/"`. I want the form > to send a POST request to `"/register/"`.

Re: How to get as result a list of all the users ordered by birthday (month day), ignoring year

2017-11-21 Thread Dan Tagg
oc/refman/5.7/en/mathematical-functions.html#function_mod> . Something like MOD( TIMESTAMPDIFF( 'SECOND', birthday, '1900-01-01'), 31556951) assuming you're using MySQL. On average there are 365.2425 days per year, which equates to 31,556,951 seconds. Dan On 21 November 2017 at 15:52, Robe

Re: Timezone error when I launch the admin login screen in 'Writing your first Django app'-tutorial

2017-09-26 Thread Dan Tagg
Check the Django Settings file and set TIME_ZONE = 'UTC' or something in this list http://en.wikipedia.org/wiki/List_of_tz_zones_by_name Dan On 26 September 2017 at 14:30, Lise <lise.lystl...@gmail.com> wrote: > Hi, > > I'm trying to learn how to use Django through the 'Wri

Re: Channels - Forward messages from a third party async source.

2017-09-04 Thread Dan Tagg
Hi Roger, Have you seen Diamond (http://diamond.readthedocs.io/en/latest/) it may be just what you need on the client side. Graphite (the server process) runs on Django. Dan On 1 September 2017 at 11:56, Roger Gammans <rgamm...@gammascience.co.uk> wrote: > Hi all, > > I'm

Re: forms.Form.to_div ? and how override forms.Boundfield.label_tag?

2017-07-27 Thread Dan Tagg
crispy forms is a good addition for form creation http://django-crispy-forms.readthedocs.io/en/latest/. It gives you a lot of control over layout and templating. Dan On 26 July 2017 at 13:02, threesixright <threesixri...@gmail.com> wrote: > Hi All, > > Just started a few weeks

Re: recommendation for Django + Bootstrap

2017-06-28 Thread Dan Tagg
django cookie cutter does it very simply in my experience. https://github.com/pydanny/cookiecutter-django Dan On 27 June 2017 at 22:55, Alceu Rodrigues de Freitas Junior < alceu.freitas...@gmail.com> wrote: > Hello folks, > > Could you please recommend any options available to i

Re: Link to download

2017-05-03 Thread Dan Tagg
You might want to check out WhiteNoise ( https://whitenoise.readthedocs.io/en/stable/) perhaps in conjunction with a CDN On 3 May 2017 at 19:35, Tim Chase wrote: > On 2017-05-02 19:11, Antonis Christofides wrote: > > response = HttpResponse(csvfile.read(),

Re: Django Channels - Class Based Consumers

2017-04-05 Thread Dan Alderman
- it's like a > sub-channel inside the WebSocket that is used by either end to distinguish > packets from each other (it's why you provide it to the JavaScript binding > - it needs to know which stream to listen to) > > Andrew > > On Wed, Apr 5, 2017 at 9:15 AM, Dan Alderma

Re: Django Channels - Class Based Consumers

2017-04-05 Thread Dan Alderman
what the group_name and payload arguments do - but what s the stream argument doing? Dan On Tuesday, 4 April 2017 13:57:07 UTC+1, Andrew Godwin wrote: > > Hi Dan, > > An initial glance shows that you might be passing the arguments wrong to > Multiplexer.group_send(group_name, stream,

Django Channels - Class Based Consumers

2017-04-04 Thread Dan Alderman
lexer channel_routing = [ route_class(Demultiplexer, path="^/ws/"), ] Can anyone tell me where I'm going wrong? Thanks, Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: How install Django in PyCharm Community edition?

2017-02-10 Thread Dan Tagg
+1 for virtualenv On 10 February 2017 at 11:44, Stefan Milutinovic wrote: > You can't install django in PyCharm. > > You must set proper Python interpreter into PyCharm Settings. > File>Settings>Project:name_of_your_project>Project Interpreter > There you must setup proper

Re: Questions about templates from a novice - Question #1

2016-12-01 Thread Dan Tagg
can backtrack to that later. Have a look, you'll see dispatch gets the request's method tries to call a method with that name if it is a valid HTTP method and returns a HTTP 405 if either the method is not defined. Dan On Thursday, 1 December 2016, jim_anderson <jim_ander...@jjajava.com>

Re: GeoDjango with Docker

2016-12-01 Thread Dan Tagg
Cookie cutter is pretty awesome. Don't know whether it works with GeoDjango though. https://github.com/pydanny/cookiecutter-django Dan On 1 December 2016 at 13:32, hunter.cur...@gmail.com < hunter.cur...@gmail.com> wrote: > Hi Tadeo, I've recently gone through this exerci

Re: Migrations for multiple Django versions

2016-11-25 Thread Dan Tagg
Hi Vlastimil, Why not use your source control system to publish different releases for different versions of django. Dan On 25 November 2016 at 10:01, Vlastimil Zíma <vlasti...@ziima.cz> wrote: > I don't think separate migrations would make the problem any better, that > looks ju

Subtracting UNIX_TIMESTAMPS broke in Django 1.10

2016-08-16 Thread Dan Edwards
I have a query that works in Django 1.9.9 but not 1.10. Running on CentOS 7, with python 2.7.5, and MySQL 5.6.23 on Amazon RDS Example: class TaskLog(models.Model): id = models.AutoField(primary_key=True) start = models.DateTimeField(auto_now_add=True) stop =

Re: Django session issue with mod_wsgi + apache

2016-07-15 Thread Dan Tagg
Cacheing? 1. Do Bob's and James's pages have different URLs 2. Have you configured your cacheing. if you are using it, to not reuse components that could be confused? 3. Are you sending the correct cacheing directions to try and make sure caches between your infrastructure and the user's screen

Re: How to retrieve data from deep nested object?

2016-04-26 Thread Dan Tagg
Does {% for question in subsection.subsection_set.all %} work? Dan On 26 April 2016 at 13:33, Said Akhmedbayev <said@gmail.com> wrote: > I am trying to figure out how to loop over deep nested object in Django > template. > > Here is my app's code > > models.py &

Re: GROUP BY without using aggregate function

2016-03-02 Thread Dan Tagg
if your aren't counting or averaging then why are you grouping? D On 2 March 2016 at 17:06, wrote: > Hello, > > I would like to query database with Django ORM and add GROUP BY clause > without including unnecessary counting, avg, etc. > I can force/hack queryset by

Re: How to use selenium automated testing in django projects

2016-02-27 Thread Dan Tagg
Harry Percival is very good http://www.obeythetestinggoat.com Not sure if he covers Excel Dan On 27 Feb 2016 13:22, "Vikneswaran S J" <vickyrahul...@gmail.com> wrote: > I need to use selenium automated testing for django application with input > from excel sheet. How t

Re: testing django migrations

2015-12-27 Thread Dan Tagg
Hi, I used this: https://github.com/plumdog/django_migration_testcase It's only worth writing tests if you are modifying code created by makemigrations. Dan On 27 December 2015 at 10:14, varun naganathan <varunnaganathan...@gmail.com > wrote: > Hi,I wanted to know how am i suppose

How to serve a static file with django?

2015-12-23 Thread Dan Bikle
*Hi List,* *I am new to django.I read this:https://docs.djangoproject.com/en/1.9/howto/static-files/I did this:cd ~django-admin startproject mysiteI see this in ~/mysite/mysite/settings.pyINSTALLED_APPS = ['django.contrib.admin',

Re: Tool to document project urls, views, templates, etc...

2015-12-14 Thread Dan Tagg
http://ccbv.co.uk/ does this for django class based views. The code is on github https://github.com/refreshoxford/django-cbv-inspector/ Might be a good starting point. D On 14 December 2015 at 17:49, Royendgel Silberie wrote: > The closest I know is : > > python manage.py

Re: What will be the replacement for .extra()?

2015-12-10 Thread Dan Stephenson
Following is worth a watch https://opbeat.com/events/duth/#expressions On Thursday, 10 December 2015 21:22:39 UTC, thinkwell wrote: > > So how would an query like this be written, with the new Query Expression > API? Where a count of events by day is required but the date column is >

Re: RemoteUserMiddleware stay logged in

2015-12-02 Thread Dan Davis
Thanks, I can probably just install it and use it. If I must stay in 1.8 for some arcane reason, I can read the code at https://github.com/django/django. On Monday, November 30, 2015 at 8:29:00 PM UTC-5, Tim Graham wrote: > > Does the PersistentRemoteUserMiddleware added in Django 1.9 help? >

RemoteUserMiddleware stay logged in

2015-11-30 Thread Dan Davis
or my Apache directives to support this, or how I should change my use of RemoteUserMiddleware to allow this. Thanks, -Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Re: Unresolved references error in Pycharm Community edition

2015-11-28 Thread Dan Tagg
like django cookiecutter. https://github.com/pydanny/cookiecutter-django Dan On 28 November 2015 at 11:33, aftnix <aft...@gmail.com> wrote: > On শুক্রবার 27 নভে 2015 03:04 অপরাহ্ণ, Sneha R wrote: > >> Hi, >> >> I am new to Pycharm and I am trying to run a Django p

Re: How to get logged username in template

2015-11-12 Thread Dan Tagg
I would recommend using allauth http://django-allauth.readthedocs.org/en/latest/templates.html. It has template tags for adding all that info, creates pages for logging in, picks up your base template etc etc. Dan On 12 November 2015 at 08:57, Andreas Kuhne <andreas.ku...@suitopia.com>

  1   2   3   4   5   >