Re: OperationalError

2018-05-02 Thread 'Anthony Flury' via Django users
At first glance it looks like you haven't applied a migration to this computer. at the command line on this computer  - in the man project directory : If you have not copied the migration scripts from your development machine do this first : $ python manage.py makemigrations and then do

Tools in the django ecosystem for managing contact databases

2018-05-02 Thread quentin . agren
Hi, This is a question regarding tools that might be available in the django ecosystem meeting the rather simple requirements briefly summarized below. I am looking for a web-based solution that, at its core, would be able to handle a contact database. With the following constraint: think of

Re: url () to path()

2018-05-02 Thread Daniel Hepper
Hi! First of all, you still can use regular expressions to define URLs by using django.urls.re_path. You could even the old django.conf.urls.url, which is still available, so you don't have to change any existing code. What you are asking for is the corresponding path converter to a regular

Integrating cryptoassets.core library in django

2018-05-02 Thread Hitesh Goyal
Hi, I am trying to configure the cryptoassets.core library for bitcoin applications using the following url : - https://pypi.org/project/cryptoassets.django/ When i run the command :- "python manage.py cryptoassets_helper_service" I am getting the following error :- ImportError: No module

Re: Django dependecies

2018-05-02 Thread Avraham Serour
The admin app uses it, you can make your app without worrying about it, one won't affect the other On Wed, 2 May 2018, 14:09 Mauro Ribeiro, wrote: > Hi, > > Why does django include jquery? > > django/django/contrib/admin/static/admin/js/vendor/jquery/jquery.js > >

Django dependecies

2018-05-02 Thread Mauro Ribeiro
Hi, Why does django include jquery? django/django/contrib/admin/static/admin/js/vendor/jquery/jquery.js What use does it make of it? I cant have that version of jquery in my app so I want to know that impacts of jquery on django. Thanks -- You received this message because you are

DJANGO Migrations from older version : South db

2018-05-02 Thread Ank
Dear All, I would like to do some migrations that are compatible with older django version using southdb to the newer version. How can these files be updated.iḿ attaching one of the file that is needed to be migrated. Any help will be appreciated Best Ank -- You received this message

Re: DJANGO Migrations from older version : South db

2018-05-02 Thread Gerald Brown
If you have the original models.py files just run "python manage.py makemigrations" and then "python manage.py migrate". On Wednesday, 02 May, 2018 05:11 PM, Ank wrote: Dear All, I would like to do some migrations that are compatible with older django version using southdb to the newer

Re: OperationalError

2018-05-02 Thread Gerald Brown
Thanks for the reply. I have done the makemigrations/migrate numerous times.  Each time it says there is an error in the previous migration file so I have to comment out most of the file.  I then just deleted all of the self generated migration files and started fresh. I was also getting

Re: url () to path()

2018-05-02 Thread Kayode Oladipo
Thanks a Lot! That was very helpful On May 2, 2018 08:36, "Daniel Hepper" wrote: > > Hi! > > First of all, you still can use regular expressions to define URLs by using django.urls.re_path. You could even the old django.conf.urls.url, which is still available, so you

Re: DJANGO Migrations from older version : South db

2018-05-02 Thread Ankush Sharma
I tried it and getting this error INFO 2018-05-02 15:15:22,713 CATMAID was unable to load the h5py library, which is an optional dependency. HDF5 tiles are therefore disabled. To enable, install h5py. WARNING 2018-05-02 15:15:22,982 NeuroML module could not be loaded. Traceback (most recent call

RE: OperationalError

2018-05-02 Thread Matthew Pava
“random letters & numbers” That looks like merge conflicts with Git. You’ll want to fix those up, not just by deleting those lines, but by verifying the code does what you want it to. You may want to just delete all of your migrations files and start anew if they’re not important to you.

Django performances issue

2018-05-02 Thread prakash sharma
I have developed the API using DRF but facing the major performances issue. Here is what the scenario is: I am using DRF. Our API call is growing towards 5k per day. Each API call is taking 3 to 10 minutes of time while responding ( as It creates upto 300 pdf label unique format) I am using

Re: Django performances issue

2018-05-02 Thread Avraham Serour
How many workers do you have? What those requests do? Even 3 minutes sounds like too much, do they just query from the DB and render a template? How caching didn't help? did you count the cache miss/hit? What are you caching? On Wed, May 2, 2018 at 3:59 PM, prakash sharma

Re: Django performances issue

2018-05-02 Thread Julio Biason
Hi Prakash, Do you need to answer the PDF directly? I mean, can't you just use the API to async-ly create the PDFs (using Celery, for example) and just return a jobId of sorts? The use will, then, make calls to check the jobid status; when the PDF is done, the job is changed to complete and you

Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
Dear Andrew, I would like to ask couple of questions about the lifecycle of consumers running in Channels workers and serving custom channels. Consider a consumer: # myconsumer.py class MyConsumer(channels.consumer.AsyncConsumer): async def wakeup(self, message): await

Re: Add extra fields to a ModelAdmin form

2018-05-02 Thread Mark Phillips
James, Did you ever get a response to this issue? I am having a devil of a time adding some extra non-model fields to an admin inline form. My added complication is that the fields are only defined at run time, so I have to have a loop that creates them based on a different model in my app.

Re: Django performances issue

2018-05-02 Thread prakash sharma
Hi @Julio I am also planning to go for the job/message queue, but for this we have to change the default follow so this not feasible at this moment for me. For now what can be the best approach. Like server scaling, worker count > On Wednesday, May 2, 2018 at 6:54:23 PM UTC+5:30, prakash

Re: Integrating cryptoassets.core library in django

2018-05-02 Thread Mario R. Osorio
You need to give more details, such as: - Did you PIP the application? - Did you remember to add it to INSTALLED_APPS? On Wednesday, May 2, 2018 at 7:10:31 AM UTC-4, Hitesh Goyal wrote: > > Hi, > I am trying to configure the cryptoassets.core library for bitcoin > applications using

Re: Add extra fields to a ModelAdmin form

2018-05-02 Thread 'James Foley' via Django users
Hey Mark, I've not actually found a solution yet, I've just sort of put it at the bottom of my pile of problems... Here is the post that I used to get where I am https://stackoverflow.com/a/35797311/3173119 It just doesn't feel very Django like, and I feel that there must be an easier way to

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Andrew Godwin
- Will `MyConsumer` receive new `wakeup` messages while awaiting ` some_process`? Yes. The worker server runs as many application instances as there are messages coming in, even though they all have the same scope. You can see the main listening loop here:

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Andrew Godwin
Ah, my apologies - you are entirely right, the scope is the same so it will re-use a single existing instance, which means that it will process messages synchronously and lose them, as you suggested. Using sync_to_async won't help as, while it runs in a threadpool, it also blocks the coroutine

Re: need help

2018-05-02 Thread Umar Kambala
I believe its low connection On May 2, 2018 5:16 PM, "Jani Tiainen" wrote: > Looks like your machine doesn't have connection to (some parts) of > internet for some reason, or you do have very slow connection. > > On Wed, May 2, 2018 at 7:46 PM, wrote: >

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
Indeed, that is exactly what I am doing - run processing in the background with task = asyncio.ensure_future(database_sync_to_async(self._process)(message)) and then keep track of that running tasks. Actually, I am quite happy with this except one thing. I would like to limit the number if

Re: need help

2018-05-02 Thread Umar Kambala
So wat do I do then? On May 2, 2018 5:28 PM, "Aditya Singh" wrote: > Sure it is mate > > On Wed, May 2, 2018, 10:51 PM Umar Kambala wrote: > >> I believe its low connection >> On May 2, 2018 5:16 PM, "Jani Tiainen" wrote:

django admin and logout

2018-05-02 Thread Hervé Edorh
It is possible to make django admin application to logout after 5 minutes of no activity? Thank you -- 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

Re: django admin and logout

2018-05-02 Thread Jani Tiainen
Hi, It really depends on your definition of "no activity". By default login is tied to session which expiracy you can set (default 2 weeks). Session expiry is by default only updated when session is changed, so for example pure reads that don't touch session do not count as activity. This can

Re: need help

2018-05-02 Thread Aditya Singh
You're most welcome On Wed, May 2, 2018, 11:04 PM Umar Kambala wrote: > Thanks > On May 2, 2018 5:33 PM, "Aditya Singh" > wrote: > >> Try to upgrade your internet connection or set up a hotspot from a mobile >> device having a good signal

Re: need help

2018-05-02 Thread Jani Tiainen
Looks like your machine doesn't have connection to (some parts) of internet for some reason, or you do have very slow connection. On Wed, May 2, 2018 at 7:46 PM, wrote: > please this is the massage i keep on getting when trying to install > django.. what do i do? > > >

Re: need help

2018-05-02 Thread Aditya Singh
Sure it is mate On Wed, May 2, 2018, 10:51 PM Umar Kambala wrote: > I believe its low connection > On May 2, 2018 5:16 PM, "Jani Tiainen" wrote: > >> Looks like your machine doesn't have connection to (some parts) of >> internet for some reason, or you

need help

2018-05-02 Thread umarkambala
please this is the massage i keep on getting when trying to install django.. what do i do? C:\Users\Admin>pip install Django==2.0.5 Collecting Django==2.0.5 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by

Django with mongo

2018-05-02 Thread Aditya Singh
Kindly help me with the mist efficient and easy method of integrating mongo with django.I have tried djongo but need to expand my approach. Kind Regards, Aditya -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: need help

2018-05-02 Thread Aditya Singh
This has surely to do with your internet connection mate. On Wed, May 2, 2018, 10:46 PM Jani Tiainen wrote: > Looks like your machine doesn't have connection to (some parts) of > internet for some reason, or you do have very slow connection. > > On Wed, May 2, 2018 at 7:46

Re: django admin and logout

2018-05-02 Thread Umar Kambala
Don't get u.. The problem is that I can't install it On May 2, 2018 5:15 PM, "Jani Tiainen" wrote: > Hi, > > It really depends on your definition of "no activity". > > By default login is tied to session which expiracy you can set (default 2 > weeks). > > Session expiry is by

Re: need help

2018-05-02 Thread Umar Kambala
Thanks On May 2, 2018 5:33 PM, "Aditya Singh" wrote: > Try to upgrade your internet connection or set up a hotspot from a mobile > device having a good signal strength and internet speed and try again. > Should work for sure > > On Wed, May 2, 2018, 11:01 PM Umar

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
Andrew, thank you for quick response! Unfortunately I see something different. If I raise `StopConsumer` after processing a single message, the next one is lost. From the code https://github.com/django/asgiref/blob/master/asgiref/server.py#L75 I see that `get_or_create_application_instance`

Re: need help

2018-05-02 Thread Aditya Singh
Try to upgrade your internet connection or set up a hotspot from a mobile device having a good signal strength and internet speed and try again. Should work for sure On Wed, May 2, 2018, 11:01 PM Umar Kambala wrote: > So wat do I do then? > On May 2, 2018 5:28 PM, "Aditya

Re: Need help: django-admin.py startproject [projectname] creates directory which I cannot access

2018-05-02 Thread Daisy
Thank you very much for your reply, and here I my answers: * Does the directory show up when you do a *dir* command in projectdir ? It does not show up, although it says that there are 2 directories (see attachment). * Can you do anything on the *mysite* directory - can you rename it,

Admin site and ModelAdmin

2018-05-02 Thread jt . oldnews
I'm new to Django and web development in general (C++ background) and I've got amazingly far very quickly, but there's one thing I've been struggling with for a couple days now :-(. Forgive me if I screw up the lingo. I've got a ModelAdmin page for registrants of a conference which has fields

Need help: django-admin.py startproject [projectname] creates directory which I cannot access

2018-05-02 Thread Daisy
I installed django according to provided instructions and I am trying to follow the Django article: Writing your first Django app, part 1 but I am stuck at Creating a project with command: django-admin startproject mysite. The problem is

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Andrew Godwin
At the level of abstraction of the Worker, you can't prevent it pulling more messages off the queue - if you want that level of control, you would have to subclass it and change the logic yourself, I imagine. Andrew On Wed, May 2, 2018 at 1:12 PM Alexander Prokhorov wrote: >

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
Thank you very much! четверг, 3 мая 2018 г., 1:07:22 UTC+3 пользователь Andrew Godwin написал: > > At the level of abstraction of the Worker, you can't prevent it pulling > more messages off the queue - if you want that level of control, you would > have to subclass it and change the logic

Re: Admin site and ModelAdmin

2018-05-02 Thread Mike Dewhirst
On 3/05/2018 7:00 AM, jt.oldn...@gmail.com wrote: I'm new to Django and web development in general (C++ background) and I've got amazingly far very quickly, but there's one thing I've been struggling with for a couple days now :-(. Forgive me if I screw up the lingo. I've got a ModelAdmin

Adding to all templates context via Middleware

2018-05-02 Thread Bernd Wechner
This interests me: https://teamtreehouse.com/community/django-how-can-i-retrieve-a-value-from-the-middleware alas no answer there, and time has changed things. I have checked form experience, that stuff added to response.context_data in middleware is not seen in templates (perhaps comes

Re: Admin site and ModelAdmin

2018-05-02 Thread Mike Dewhirst
On 3/05/2018 10:33 AM, Mike Dewhirst wrote: On 3/05/2018 7:00 AM, jt.oldn...@gmail.com wrote: I'm new to Django and web development in general (C++ background) and I've got amazingly far very quickly, but there's one thing I've been struggling with for a couple days now :-(. Forgive me if I

Re: need help

2018-05-02 Thread Gerald Brown
Have you tried "pip install django" without the "== 2.0.5". I think that if you do not specify a version pip will install the latest version. On Thursday, 03 May, 2018 12:46 AM, umarkamb...@gmail.com wrote: please  this is the massage i keep on getting when trying to install django.. what do

Re: Need help: django-admin.py startproject [projectname] creates directory which I cannot access

2018-05-02 Thread 'Anthony Flury' via Django users
Lets troubleshoot: * Does the directory show up when you do a *dir* command in projectdir ? * Can you do anything on the *mysite* directory - can you rename it, or even delete it ? * Can you see it in File explorer * Can you manually create a directory in your *projectdir* ? * Can you

Re: Integrating cryptoassets.core library in django

2018-05-02 Thread Hitesh Goyal
Yes I did. 1) I installed all the required packages. 2) Added to Installed apps. Here is my settings.py file :- """ Django settings for crypto project. Generated by 'django-admin startproject' using Django 2.0. For more information on this file, see