Adding stored procedures

2018-04-17 Thread Chris Wedgwood
Hi All I am using SQL SERVER in my latest django project and I am going to be using some stored procedures. My question is about how to go about deploying stored procedure changes with django. I have looked through the migrations documentation which looks very specific to model changes. Has anyo

Re: ARGPARSE ERROR

2018-04-17 Thread 'Anthony Flury' via Django users
Are you using virtual environments ? I found an issues where it seemed like part of the standard library was missing - and it was due to my virtual environment having an old version of the Python 2 binary. Some time in the Python 2.7 lifecycle, there was a change as to how the standard library

Re: A first time programmer

2018-04-17 Thread Paul Baforh
Thanks everyone for your replies so far. I have another prob: I'm trying to create a new file (.py) in my app using vscode but I get the error "permission denied writing to file" then followed by the directory of the base file -- You received this message because you are subscribed to the Goo

Re: Django UnicodeDecodeError

2018-04-17 Thread James Schneider
> > iit's all right in unbuntu,but maybe something wrong with my windows. > Every time someone posts an error like this, it is because the hostname of the machine contains a non-ASCII character. What is the hostname? -James -- You received this message because you are subscribed to the Google G

Re: Stripping HTML tags and replacing for newlines

2018-04-17 Thread James Schneider
> > > Now when I send the emails I of course want to send both text content and > HTML. My idea from the beginning was to take my HTML content and strip the > HTML tags and then send that. I did this via the django utils that strip > tags. Now this works, HOWEVER I don't get any newlines for my an

Re: Stripping HTML tags and replacing for newlines

2018-04-17 Thread Mike Dewhirst
On 18/04/2018 6:51 AM, Andréas Kühne wrote: Hi all, I am hoping that someone has stumbled across a solution to a problem that I have currently. I have created an email templating system. Each template can contain placeholders that will be replaced with live data (a bit like the django templ

Re: How to handle a migration that last too long for being deployed?

2018-04-17 Thread Mike Dewhirst
On 17/04/2018 6:27 PM, Adrien Cossa wrote: Hi, On 04/14/2018 02:38 AM, Mike Dewhirst wrote: Does it actually stop users reading? If the entire migration happens in a single transaction, the database (Postgres anyway) should remain accessible until the moment it is committed. Maybe you could

Re: Multiple settings files with sites framework

2018-04-17 Thread Mike Dewhirst
On 17/04/2018 8:51 PM, sbarnett wrote: What is the best way to structure multiple settings files when using the Sites framework? I've already got a base settings file along with a local, staging and production file which inherits from this and makes some changes/additions. But now I need to

Re: Possibly a bug in BaseContext

2018-04-17 Thread python2and3developer
There is also something strange here: https://github.com/django/django/blob/master/django/template/context.py#L229 That line "self.update({})" doesnt do nothing. The inherited "update" method from Context class doesnt do nothing extra. The same here: https://github.com/django/django/blob/master

Problem with Channels and Celery... Please help me!

2018-04-17 Thread Sergio Lopez
I'm trying to create a chat that when it meets the condition of "hola" is sent by a task in celery. However, when it enters the condition the status is not updated, can someone help me? I leave my code, please help! Mi error is: > [2018-04-18 01:11:25,798: WARNING/MainProcess] c:\python\lib\s

Re: I have a problem whit new celery and channels

2018-04-17 Thread Sergio Lopez
> > Hi! > > I'm trying to create a chat that when it meets the condition of "hola" is > sent by a task in celery. However, when it enters the condition the status > is not updated, can someone help me? > > > I leave my code, please help me! > > > Please help me, thx! And sorry for my english :s

Possibly a bug in BaseContext

2018-04-17 Thread python2and3developer
Maybe this is a bug. It doesnt make sense this line: https://github.com/django/django/blob/master/django/template/context.py#L48 Its creating a ContextDict: ContextDict(self, *dicts, **kwargs) ContextDict inherits directly from dict. A dictionary only allows one argument. Not more

I have a problem whit new celery and channels

2018-04-17 Thread Sergio Lopez
Hi! I'm trying to create a chat that when it meets the condition of "hola" is sent by a task in celery. However, when it enters the condition the status is not updated, can someone help me? I leave my code, please help me! Please help me, thx! And sorry for my english :s *consumers.py*

How to Make a Custom Inline Form for Admin

2018-04-17 Thread Mark Phillips
I am using django 1.11. I have these models (among others): models.py:# MetaDataclass MetaData(models.Model): metadata_id = models.AutoField(primary_key = True) name = models.CharField('metadata name', max_length=200, unique=True) description = models.TextField('description')

Stripping HTML tags and replacing for newlines

2018-04-17 Thread Andréas Kühne
Hi all, I am hoping that someone has stumbled across a solution to a problem that I have currently. I have created an email templating system. Each template can contain placeholders that will be replaced with live data (a bit like the django templating system). When I store the templates they are

Re: Django Channels also works when I have no Worker running.

2018-04-17 Thread Andrew Godwin
Channels 2 does not run requests in workers. Workers are now only for running background tasks on specific channels, and so you do not need them normally. Andrew On Tue, Apr 17, 2018 at 6:54 AM, Christopher Wittlinger < cwittlinge...@gmail.com> wrote: > I think I misunderstood the concept of the

Re: Django Channels also works when I have no Worker running.

2018-04-17 Thread Christopher Wittlinger
I think I misunderstood the concept of the workers. I thought that all Requests (HTTP and Websocket) are delegated to some sort of consumers which is run in a Worker. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gro

Re: Django Channels also works when I have no Worker running.

2018-04-17 Thread Christopher Wittlinger
When I am logging from within the consumers it is logged from my web process and not the worker process. -- 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-

Django Channels also works when I have no Worker running.

2018-04-17 Thread Christopher Wittlinger
I am using Django Channels already quite a while (v2) and I just noticed that when I disable all my workers, that the consumers still work. I am using the channels_redis.core.RedisChannelLayer and my Routing looks like that: application = ProtocolTypeRouter({ "websocket": URLRouter([

Re: Advice needed: One big model or many apps with highly interlinked data tables?

2018-04-17 Thread Mike Dewhirst
Don't forget that you can also split all your model classes one each into their own separate files. Create a models dir and put them in there. Then in app/models/__init__.py you say ... from .thismodel import ThisModel from .thatmodel import ThatModel And so on. In any view or other file you

Re: Django channels 2 and data binding

2018-04-17 Thread ijazz jazz
This not only meant that all request data had to be re-serialized over the network, but that you needed to deploy and scale two separate sets of servers. Channels 2 changes this by running the Django code in-process via a threadpool, meaning that the network termination and application logic ar

Authorization in Django

2018-04-17 Thread Amar Savalagi
Hey every on please visit my blog on authorization in django -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Django UnicodeDecodeError

2018-04-17 Thread fadingneko
iit's all right in unbuntu,but maybe something wrong with my windows. -- You received this message because you are subscribed to the Google Groups "Django users" g

Multiple settings files with sites framework

2018-04-17 Thread sbarnett
What is the best way to structure multiple settings files when using the Sites framework? I've already got a base settings file along with a local, staging and production file which inherits from this and makes some changes/additions. But now I need to use the Sites framework so I need another

Re: How to handle a migration that last too long for being deployed?

2018-04-17 Thread Adrien Cossa
Hi, On 04/14/2018 02:38 AM, Mike Dewhirst wrote: Does it actually stop users reading? If the entire migration happens in a single transaction, the database (Postgres anyway) should remain accessible until the moment it is committed. Maybe you could announce a maintenance operation which will

Re: Advice needed: One big model or many apps with highly interlinked data tables?

2018-04-17 Thread PASCUAL Eric
Hi Mikkel, When facing this type of situation, I tend to use one of these two options, depending on the number of model classes: * if the number of classes is reasonable, I use a single app, but implement the models in a model package, distributing the classes into modules inside this pa