Django Admin CSS Not Working

2018-11-26 Thread Kayode Oladipo
So, after about 3 months of my django admin CSS suddenly crashing and burning; it shows that the CSS is loaded in terminal. GET base.css 200 blah blah. However, it doesn't apply to the page when it is run in the browser. A little poking with the Style Editor in Firefox and Opera, and voila! The

Re: Custom attributes in django forms

2018-11-26 Thread Yavin Aalto Arba
Hi Gordon, Try starting with the documentation here and if u have any questions please let us know: https://docs.djangoproject.com/en/2.1/ref/forms/widgets/ On Sun, Nov 25, 2018, 11:09 PM gordon nchy hello everyone > i'm facing a challenge on how to add custom attributes to django login >

Re: Custom attributes in django forms

2018-11-26 Thread gordon nchy
thanks! gnchy On 26 Nov 2018 11:22, "Yavin Aalto Arba" wrote: > Hi Gordon, > > Try starting with the documentation here and if u have any questions > please let us know: > > https://docs.djangoproject.com/en/2.1/ref/forms/widgets/ > > On Sun, Nov 25, 2018, 11:09 PM gordon nchy >> hello

unable to do migrate when defining custom user model

2018-11-26 Thread Jim Lamb
Send us some code -- 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 group, send email to

Recommend Tutorials

2018-11-26 Thread Tim Johnson
Using django 2.0 on ubuntu with python 3.5.2 Some tutorials that I have tried have deprecated code and I get errors. I would appreciate recommendations for tutorials that are concurrent with my version of django. I presume that one at https://docs.djangoproject.com/en/2.1/intro/tutorial01/ is

How to get a multiple select widget for the Admin without a queryset

2018-11-26 Thread Mike Dewhirst
In the Admin I would like to provide the user with checkboxes against a list of options not stored in the database. Specifically, I want to retrieve a comma separated list of integers from a model field choices attribute. The model field looks like this:     menu_links =

Re: Recommend Tutorials

2018-11-26 Thread Phako Perez
What I can recommend to you for this, is to use same versions for each module on the tutorial so your code will works You can create a virtual environment for each tutorial using viertualenv and as a good practice you can list all module requirements on requirements.txt file Regards Sent from

Re: Looking for a Django Co-Founder.

2018-11-26 Thread TimT Vogt
The only way to look at the plan is making an paid account. Why not put a pdf or link to Dropbox? Verstuurd vanaf mijn iPhone > Op 18 nov. 2018 om 04:00 heeft Zack Amaral het > volgende geschreven: > > Lucas, > > So basically I'm trying to build twitch.tv for the music industry. Users will

Re: How to get a multiple select widget for the Admin without a queryset

2018-11-26 Thread Mike Dewhirst
On 27/11/2018 3:57 PM, shiva kumar wrote: Can you explain what ur problem briefly. In the Admin I show a list of substance names and against each one there can be a list of clickable links to public chemical databases. When the user clicks one of those links the database opens in a new browser

Re: How to get a multiple select widget for the Admin without a queryset

2018-11-26 Thread shiva kumar
Can you explain what ur problem briefly. On Tue 27 Nov, 2018 8:54 am Mike Dewhirst In the Admin I would like to provide the user with checkboxes against a > list of options not stored in the database. > > Specifically, I want to retrieve a comma separated list of integers from a > model field

how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
if settings.DEBUG: # urlpatterns += patterns('', # ('media/(?P.*)', # 'django.views.static.serve', # {'document_root': settings.MEDIA_ROOT})) this is the result File "C:\Users\Abba\Desktop\rest_picker\restaurants\urls.py", line 22 if settings.DEBUG: ^

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Yavin Aalto Arba
did you import settings? On Mon, 26 Nov 2018 at 15:34, Abba Haruna wrote: > if settings.DEBUG: > # urlpatterns += patterns('', > # ('media/(?P.*)', > # 'django.views.static.serve', > # {'document_root': settings.MEDIA_ROOT})) > > > > this is the result > > File

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
even if i close it is not working On Mon, Nov 26, 2018 at 5:54 AM Michal Petrucha < michal.petru...@konk.org> wrote: > On Mon, Nov 26, 2018 at 02:48:25PM -0800, Abba Haruna wrote: > > # from django.conf.urls import patterns, url > > from django.conf.urls.static import static > > from

Re: Custom attributes in django forms

2018-11-26 Thread aakashchoudhary66
I am using version 2.1.3 of python and I add render in the view and after running the server it showing template does not existSent from my Samsung Galaxy smartphone. Original message From: gordon nchy Date: 26/11/2018 02:08 (GMT-08:00) To: django-users@googlegroups.com

Re: Django Admin CSS Not Working

2018-11-26 Thread Manish Kumar
once clear the cache and load admin page. On Mon, Nov 26, 2018 at 3:29 PM Kayode Oladipo wrote: > So, after about 3 months of my django admin CSS suddenly crashing and > burning; it shows that the CSS is loaded in terminal. GET base.css 200 blah > blah. However, it doesn't apply to the page

Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-26 Thread Abba Haruna
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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Michal Petrucha
On Mon, Nov 26, 2018 at 02:48:25PM -0800, Abba Haruna wrote: > # from django.conf.urls import patterns, url > from django.conf.urls.static import static > from django.views.generic import ListView > from restaurants.models import Food > from django.conf import settings > > urlpatterns =

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Yavin Aalto Arba
It's kinda all over the place. 1. conventions: urlpatterns is a list not a tuple 2. 'restaurants.views', without include? what's this for? 3. You did not close the parenthesis correctly in the second item, here's how its supposed to be written: path('',ListView.as_view(model=Food,

Re: Shared code best practices

2018-11-26 Thread Saurabh Agrawal
Hi The can be kept in independent modules which can then be imported in various apps. At least that's what I do. :-) On Mon, Nov 26, 2018, 20:01 pratibha sharma wrote: > Hi, > > I have some functions which are used by multiple apps in my codebase. > > Functions are like send email, custom

Re: Strange intermittent UUID bug

2018-11-26 Thread Tim Graham
See if https://groups.google.com/d/msg/django-users/ZGb8ofw1Ux8/TnMdqsj4AgAJ helps. On Friday, November 23, 2018 at 1:11:21 PM UTC-5, Zach wrote: > > You could try modifying to_python with something like this: > > import logging > > > def to_python(self, value): > if value is not

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Michal Petrucha
On Mon, Nov 26, 2018 at 04:34:42PM +0200, Yavin Aalto Arba wrote: > It's kinda all over the place. > > 1. conventions: > urlpatterns is a list not a tuple > 2. > 'restaurants.views', without include? what's this for? > > 3. You did not close the parenthesis correctly in the second item, here's

Re: Make a loop to get request.POST information

2018-11-26 Thread shiva kumar
Try this Replace 'input_'.a with 'input_'+str(a) I think it will work On Mon 26 Nov, 2018 9:43 pm Thibaud MONTAGNON Hi, > > I got 3 differents input named input_1, input_2, input_3 and I want to > make a loop to put them in the ddb. > > I try to use this code but it dosent work... > >

runserver error rectification

2018-11-26 Thread Sanjay Malviya
good evening, pls anyone help me in error out following command notification got after runserver command PS C:\Users\AARVIND\mycode\mysite> python manage.py runserver Performing system checks... Unhandled exception in thread started by .wrapper at 0x02AC3F60> Traceback (most recent call last):

Make a loop to get request.POST information

2018-11-26 Thread Thibaud MONTAGNON
Hi, I got 3 differents input named input_1, input_2, input_3 and I want to make a loop to put them in the ddb. I try to use this code but it dosent work... row=[1,2,3] for a in row: polls = Polls.objects.create(motsclef=request.POST[*'input_'.a*]) Could you help me ? (I

Re: Make a loop to get request.POST information

2018-11-26 Thread Thibaud MONTAGNON
It's work ! Thanks :) -- 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 group, send email to

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
Yes lets me show you the code On Mon, Nov 26, 2018 at 5:47 AM Yavin Aalto Arba wrote: > did you import settings? > > On Mon, 26 Nov 2018 at 15:34, Abba Haruna wrote: > >> if settings.DEBUG: >> # urlpatterns += patterns('', >> # ('media/(?P.*)', >> # 'django.views.static.serve', >> #

Shared code best practices

2018-11-26 Thread pratibha sharma
Hi, I have some functions which are used by multiple apps in my codebase. Functions are like send email, custom exception etc. Is there any best practices for keeping shared code? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Mobile application Development.

2018-11-26 Thread RAVI SONAWANE
Can we use Django for flutter app ? -- 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 group, send

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
# from django.conf.urls import patterns, url from django.conf.urls.static import static from django.views.generic import ListView from restaurants.models import Food from django.conf import settings urlpatterns = ('restaurants.views', path('',ListView.as_view(model=Food,

Re: runserver error rectification

2018-11-26 Thread Jason
whatever you have as url patterns is not a list, tuple or other iterable. -- 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 forms versus widgets versus crispy forms

2018-11-26 Thread TimT Vogt
Is there a good tutorial for Posting forms in the database? I have a model and views and able to post name adres from the admin on local host:8000. Now try to decide what is best for name adres and shipping. On two separate forms So I am figuring out how my models need to look. Verstuurd

Re: how to fix this problem using 2.1.3 version

2018-11-26 Thread Abba Haruna
okay thank you lets me trying On Mon, Nov 26, 2018 at 6:35 AM Yavin Aalto Arba wrote: > It's kinda all over the place. > > 1. conventions: > urlpatterns is a list not a tuple > 2. > 'restaurants.views', without include? what's this for? > > 3. You did not close the parenthesis correctly in the

Max function and grouping with Oracle

2018-11-26 Thread Dan Davis
I have a parent model that has a relationship to some data that is changing: class Parent(models.Model): name = models.CharField(...) created_timestamp = models.DateTimeField(auto_now_add=True, null=True) updated_timestamp = models.DateTimeField(auto_now=True, null=True) class

Re: Make a loop to get request.POST information

2018-11-26 Thread kennedy kay
Or you can simply do something like this ##method 1 > > Polls = [] > > for x in range(1, 4): > > #then creat a list of poll objects and append to the polls list > > Polls.append('input_'+str(x)) > > polls = Polls.object.create(motsclef = request.POST['input_{x}' for x in range(3)]) On

Re: Make a loop to get request.POST information

2018-11-26 Thread kennedy kay
This should work ##method 1 > Polls = [] > for x in range(1, 4): > #then create a list of poll objects and append to the polls list > Polls.append('input_'+str(x)) On Monday, November 26, 2018 at 5:13:01 PM UTC+1, Thibaud MONTAGNON wrote: > > Hi, > > I got 3 differents input named input_1,

unable to do migrate when defining custom user model

2018-11-26 Thread shiva kumar
i am defining my own custom user model using AbstractBaseUser class and BaseUserManager class. and i got no error when doing 'python manage.py makemigrations' but it is showing that db not created while running 'python manage.py migrate' . Any suggestions? -- You received this message because

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: > >

Channels: development issue with multiple daphne workers

2018-11-26 Thread Zhiyu (Drew) Li
Hi there, I am trying to migrate a tornado project to django channel2. I have moved all essential parts and wired them up in channel. It runs OK in development mode, but in production it seems the multi-daphne worker configuration is causing strange errors. AttributeError:

Logging a button click

2018-11-26 Thread Jim Lamb
I am trying to log a button click from a template. Can someone please help??? view.py from django.shortcuts import render from .models import UploadFile from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger import

Human Readable Values

2018-11-26 Thread Mike Sacauskis
[image: Screenshot.png] Hi I'm new to DJango and have a question about how to display some model data in a human readable form. I have three fields, one is an IP Address and two are . When I render the template I get the class name but no values. How do I render the values? Thanks

Re: Looking for a Django Co-Founder.

2018-11-26 Thread Tim Vogt
Hi Zack just made an account to live plan. It seems you have removed me form the plan. Tim On Sunday, November 25, 2018 at 7:46:53 PM UTC+1, Tim Vogt wrote: > > Hi Zack do I need an account for liveplan? > > Tim > > Verstuurd vanaf mijn iPhone > > Op 18 nov. 2018 om 00:53 heeft Lucas G. Navarro