Re: Any django reusable app for outdoor & indoor location, GPS tracking?

2018-05-04 Thread 'Federico Capoano' via Django users
Hey everyone, I forgot to follow up on this thread. django-loci now provides abstract/base classes for models, admin, channels so other developers can use this reusable app as a kind of library. There's ample room for improving this new reusable app bu

Re: Admin site and Model

2018-05-04 Thread Fidel Leon
You need to add your model to the app's admin.py file. As an example: https://docs.djangoproject.com/en/2.0/intro/tutorial02/#make-the-poll-app-modifiable-in-the-admin El vie., 4 may. 2018 a las 8:32, Harish Soni () escribió: > Hi All, > whenever I create a new model(table) and migrate. I can se

Re: Admin site and Model

2018-05-04 Thread Harish Soni
I've added to app's admin.py then only mentioned in mail. On Fri 4 May, 2018, 2:58 PM Fidel Leon, wrote: > You need to add your model to the app's admin.py file. > > As an example: > https://docs.djangoproject.com/en/2.0/intro/tutorial02/#make-the-poll-app-modifiable-in-the-admin > > El vie., 4

Re: Admin site and Model

2018-05-04 Thread Fidel Leon
May we see your admin.py? El vie., 4 may. 2018 a las 8:32, Harish Soni () escribió: > Hi All, > whenever I create a new model(table) and migrate. I can see it is > available in mysql but its not showing in admin. I have to delete my db and > make migrations of all the tables again to make that ta

Re: Crazy Idea: OOP for "Hyperlink"

2018-05-04 Thread guettli
In my use case there is no model involved. I have a django url-mapping (regex to view) not model. Regards, Thomas Güttler Am Montag, 30. April 2018 15:55:44 UTC+2 schrieb TonyF-UK: > > What is wrong with a special type of Field - which is a URL, but also > have augmented data items which are

importError

2018-05-04 Thread gkfka5968
I run 'python manage.py runserver'. but this message appear. Traceback (most recent call last): File "C:\Users\gkfka\PycharmProjects\django\venv\lib\site-packages\django\utils\autoreload.py", l ine 228, in wrapper fn(*args, **kwargs) File "C:\Users\gkfka\PycharmProjects\django\venv\lib

I got error when working on "Writing your first Django app, part 5" of tutorial

2018-05-04 Thread truongtronghai
When I run below command >>> response = client.get('/') I got error "module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'" Please give me advice to solve it. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

Django-channels request depending Middleware

2018-05-04 Thread Marius Räsener
Hey everybody, We are using a Middleware to inject postgresql schemas into queries based on a subdomain. You can have a look how it‘s done here: https://github.com/systori/systori/blob/dev/systori/apps/company/middleware.py Now, for channels I‘ve noticed that there is no usual request, right? So

Re: importError

2018-05-04 Thread Fidel Leon
>From the look of things, it seems: -You're following the Django v2.0 tutorial. -You have installed a Django v1 version. This is an example with Django v2: >>> import django >>> django.get_version() *'2.0.5' * >>> from django.urls import include, path >>> *[No error]* And this is an example with

Re: Working through the Django tutorial and have run into a problem I cannot figure out. Help would be appreciated. What am I missing here? whenever is search the url "http://127.0.0.1:8000/polls/" th

2018-05-04 Thread gibsonal2026
okay On Thursday, May 3, 2018 at 10:37:47 AM UTC-5, Avitab Ayan Sarmah wrote: > > *mysite/urls.py:* > > from django.contrib import admin > from django.urls import include, path > > urlpatterns = [ > path('', include('polls.urls')), > path('admin/', admin.site.urls), > ] > > *polls/templates/polls/

Fixtures: core.serializers.sort_dependencies sorts models in the wrong order for FK constraints

2018-05-04 Thread Andrew Wrigley
Hi all, I'm trying to dump a database fixture, and load it again to run tests. When I run `python manage.py test`, I get: > IntegrityError: Problem installing fixtures: insert or update on table > "publisher_journaldupextid" violates foreign key constraint > "publisher_journaldup_journa

sphinx is showing the django base views instead of my own views.py

2018-05-04 Thread Anthony Petrillo
The view being shown when using Sphinx on a Django site is: The beginning of my views.py is: import os from django.shortcuts import render, redirect from djan

Query Regarding Django Signals

2018-05-04 Thread Nipun Arora
Hello Community I was puzzled by the fact that if django signals are not asynchronous why do we use them as in when ever i want some trigger on post_save can't i simply write that particular trigger in the same function that handles the request for saving a new object in django views..? as in

RE: Query Regarding Django Signals

2018-05-04 Thread Matthew Pava
The advantage with the signals is that you can put all that code in one place. You may have different views that are saving the same model, and it isn’t DRY to have to put that same code in multiple locations. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf

Re: Django-channels request depending Middleware

2018-05-04 Thread Andrew Godwin
That's correct - Django middleware only runs on HTTP request objects, and so doesn't work in a WebSocket context. The recommended alternative is to write ASGI middleware for this purpose. Unfortunately, there is not good documentation on this yet, but you can see a bit about it here, in the authen

Re: I got error when working on "Writing your first Django app, part 5" of tutorial

2018-05-04 Thread brzrkr
It seems you need to point your Django project to your urls.py file. See: https://docs.djangoproject.com/en/2.0/ref/settings/#root-urlconf This should point to your urls.py file, the file containing the `urlpatterns` variable, which is a list of `path()` statements. For example if your urls.py fi

Custom User model writes email in username column and vice-versa (postgresql)

2018-05-04 Thread brzrkr
Hi guys, I'm new here. I customised the User model of my project by inheriting from AbstractBaseUser, I've also made a custom Manager through BaseUserManager and added an auth backend to login through email instead of username. The reason I did this is to let users register and login using their

Django-admin problem

2018-05-04 Thread Mikko
Hi, I'm trying to follow the tutorial, but I got this problem at the very beginning when I tried ''django-admin startproject mysite'': django-admin : The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable pr ogram. Check the spelling of the name, o

Re: Django-admin problem

2018-05-04 Thread Jani Tiainen
Hi, By the looks of error you're running windows. By default scripts are not in PATH so you need to type something like c:\python36\scripts\django-admin.py Or you should use virtualenv (or pipenv) which would set path correctly. pe 4. toukokuuta 2018 klo 19.51 Mikko kirjoitti: > Hi, > > I'm t

RE: Django-admin problem

2018-05-04 Thread Matthew Pava
And you’re using PowerShell instead of the command prompt. I typically just work in the command prompt. With PowerShell, you may have to be more explicit in your path, such as using “.\django-admin startproject mysite” From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]

Trigger password reset

2018-05-04 Thread Álmos Kovács
Hi Everyone, I got stucked with triggering password reset in my custom view. I want to trigger it in different places but I want to use the OOTB souliton. I've found that I can import and use from django.contrib.auth.forms import PasswordResetForm and from django.contrib.auth.views import password

Re: Django-admin problem

2018-05-04 Thread Mikko Meronen
Thank you for your help. I also found a video that helped me with PowerShell (just if someone else has the same problem): https://www.youtube.com/watch?v=3TqO5FfhV28 2018-05-04 21:27 GMT+03:00 Matthew Pava : > And you’re using PowerShell instead of the command prompt. I typically > just work i

Re: Query Regarding Django Signals

2018-05-04 Thread Jani Tiainen
Hi, Signals are also good for decoupling things. For example you want to do some post save action for third party models. 4.5.2018 19.10 "Nipun Arora" kirjoitti: Hello Community I was puzzled by the fact that if django signals are not asynchronous why do we use them as in when ever i want som

Re: Query Regarding Django Signals

2018-05-04 Thread jacob duyon
You can also just write a Celery task to do your async stuff and trigger it from signals.py On Fri, May 4, 2018 at 4:13 PM, Jani Tiainen wrote: > Hi, > > Signals are also good for decoupling things. > > For example you want to do some post save action for third party models. > > 4.5.2018 19.10 "

Re: Django-admin problem

2018-05-04 Thread Kamal Kumar Bharadwaj
Hi all, Thanks for al your help. My error was i was missing a / in websites/urls.py in urlpatterns(music). On Sat, May 5, 2018, 1:19 AM Mikko Meronen wrote: > Thank you for your help. > > I also found a video that helped me with PowerShell (just if someone else > has the same problem): https:/

Re: Error running Django tutorial

2018-05-04 Thread Elorm Koku
You don't have anything like music/index in your urls.py file yet you are putting it in your request. On Fri, 4 May 2018, 21:48 Kamal Kumar Bharadwaj, < bharadwaj.kamal3...@gmail.com> wrote: > Hi Guys, > > I am facing trouble while running the tutorial for Django. I have attached > the error

Re: Query Regarding Django Signals

2018-05-04 Thread Nipun Arora
okay thanks people..! On Friday, May 4, 2018 at 9:40:12 PM UTC+5:30, Nipun Arora wrote: > > Hello Community > > I was puzzled by the fact that if django signals are not asynchronous why > do we use them as in when ever i want some trigger on post_save can't i > simply write that particular tri