Re: How to access the Album's ID in the Songs Class??

2018-12-04 Thread Saurabh Agrawal
I think you can use "self.album.id" or "self.album_id". On Wed, Dec 5, 2018 at 9:20 AM Sourajit Mohanty wrote: > class Album(models.Model): > artist=models.CharField(max_length=250) > title=models.CharField(max_length=500) > > class Song(models.Model): > album=models.ForeignKey(Album,on_del

How to access the Album's ID in the Songs Class??

2018-12-04 Thread Sourajit Mohanty
class Album(models.Model): artist=models.CharField(max_length=250) title=models.CharField(max_length=500) class Song(models.Model): album=models.ForeignKey(Album,on_delete=models.CASCADE) song_title=models.CharField(max_length=250) def get_absolute_url(self): //I need to access the Album

Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2018-12-04 Thread Corey Bishop
Hi! Thanks for your email. The best advice I received and I am so glad that I took it was switching to heroku. Heroku makes everything so easy. I still use Bluehost and then I point it at my heroku app. Heroku is the best. I use postgresql with them and only recently had to start paying them. They

Problem Basic

2018-12-04 Thread David Figueroa
*Na criação de meu primeiro projeto django- estou tentando criar minha primeira aplicação (polls) através de uma view como mostrado abaixo.estou encontrando o erro mostrado na imagem do Anexo. Alguém poderia me ajudar?* Estou seguindo o passo a passo sugerido em. (https://docs.djangoproject.c

Re: How I can insert data into database automaticaly

2018-12-04 Thread Mark Phillips
James, Take a look at this page - https://docs.djangoproject.com/en/2.1/howto/initial-data/ Be sure to backup your database before you migrate just in case. Also, sometimes it is faster and easier to just drop the project's database and restore from a backup than to fiddle with the initial data.

Re: How 2 access the Primary model's ID in the Foreign model??

2018-12-04 Thread Mike Dewhirst
On 5/12/2018 7:07 AM, Sourajit Mohanty wrote: I have 2 model classes Album and Songs(where Song is the Foreign key) I want to access the Albums ID in the Songs class.. How can I do that?? song = Songs.objects.get(name='Happy birthday') albumid = song.album.id Similarly ... album = song.albu

How 2 access the Primary model's ID in the Foreign model??

2018-12-04 Thread Sourajit Mohanty
I have 2 model classes Album and Songs(where Song is the Foreign key) I want to access the Albums ID in the Songs class.. How can I do that?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

DELETE http method calls retreive function in ModelViewSet

2018-12-04 Thread Mark Dewey
I have a class defined as a subclass of viewsets.ModelViewSet which implements a destroy and retrieve function (among others). When calling the api endpoint associated with this using the DELETE http method, the retreive function is called rather than the delete function. The call looks somet

Re: How to get queryset from get method

2018-12-04 Thread Gerson David Vizquel Alemán
Hello Thiago, review this link: http://ccbv.co.uk/ El martes, 4 de diciembre de 2018, 8:38:24 (UTC-4), thiago.parolin escribió: > > I have a class (Updateview) to handle file upload for a particular model. > In this class, I do some validation on the get method that uses a queryset. > In get_obj

Integrating ml in django

2018-12-04 Thread shiva kumar
I have one doubt regarding django. That, can we use ml concepts and packages in django as our backend technology That is by using ml concepts like numpy, tensor flow can we make data present in database more functional to use like predictions etc. Any suggestions will be helpful.that makes me some

Re:

2018-12-04 Thread Gerson David Vizquel Alemán
Hello Brajesh I recomend you go to Django oficial documentation and complete the tuttorial. Is really easy for begeners. El martes, 4 de diciembre de 2018, 13:48:19 (UTC-4), brajesh kumar escribió: > > Hi, > I am looking to prep a web page based on django, with some options on a > table like,

Re: How I can insert data into database automaticaly

2018-12-04 Thread Gerson David Vizquel Alemán
Hola Jesus, la información que requieres cargar inicialmente en la base de datos es información fake o real? El martes, 4 de diciembre de 2018, 13:09:04 (UTC-4), Informatico de Neurodesarrollo escribió: > > Hello: > > I am a beginner on Django. I wish develop a web app with Django 2.1.3 > and

[no subject]

2018-12-04 Thread brajesh kumar
Hi, I am looking to prep a web page based on django, with some options on a table like, web table with link to each record. In each record, an option related to add, update, delete, search Could someone help. Thanks. Brajesh -- You received this message because you are subscribed to the G

Re: How I can insert data into database automaticaly

2018-12-04 Thread soumyajit banerjee
you can use faker library, for insert dummy data into your model. On Tue, Dec 4, 2018 at 10:39 PM Informatico de Neurodesarrollo < infneurodcr@infomed.sld.cu> wrote: > Hello: > > I am a beginner on Django. I wish develop a web app with Django 2.1.3 > and Postgres. > > I have to create my proj

How I can insert data into database automaticaly

2018-12-04 Thread Informatico de Neurodesarrollo
Hello: I am a beginner on Django. I wish develop a web app with Django 2.1.3 and Postgres. I have to create my project and later, make migrations on my data base, but I need introduce some data previously into my database like all provinces and other a lot of information's, which don't want

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread Harryxon Ndegwa
use django.urls import path instead to import path #%£& On Tue, 4 Dec 2018 7:06 pm Dheeraj Kumar thanks to respond me but still having an issue. > > from django.contrib import admin > from django.conf.urls import include, path > > urlpatterns = [ > path('boadts/', include ('boadts.urls')),

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread Dheeraj Kumar
thanks to respond me but still having an issue. from django.contrib import admin from django.conf.urls import include, path urlpatterns = [ path('boadts/', include ('boadts.urls')), path('admin/',admin.site.urls), ] File "/home/myproject/myproject/myproject/urls.py", line 2, in from

Freshers-Django jobs

2018-12-04 Thread swathi2801 Yadhav
Hi Everyone my name is Swathi I am looking for python, Django jobs I am trained in this two technologies from Asian technologies Solution near Image Hospital. please help me out and send me a mail if there are any jobs for freshers Thanks and Regards B.Swathi -- You received this message becaus

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread C. Kirby
from django.conf.urls import include you are missing conf On Tuesday, December 4, 2018 at 8:21:39 AM UTC-5, tal...@gmail.com wrote: > > plz advise... > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

from django.urls import include , path ImportError: cannot import name include

2018-12-04 Thread talkdkg
plz advise... -- 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 django-users@google

Re: Who use django-allauth!

2018-12-04 Thread Devender Kumar
You are already login(session authentication) try to visit account/logout first and then try to re login again then you might beable to reach login On Tue 4 Dec, 2018, 6:02 PM Anirudh Jain Where do you want to redirect them? Where exactly is the problem? > > On Tue, 4 Dec 2018, 17:53 >> I can't

How to get queryset from get method

2018-12-04 Thread Thiago Luiz Parolin
I have a class (Updateview) to handle file upload for a particular model. In this class, I do some validation on the get method that uses a queryset. In get_object and get_context_data I need to do the same query used in the get method, how can I reuse the get method's queryset in another method of

Re: Who use django-allauth!

2018-12-04 Thread Anirudh Jain
Where do you want to redirect them? Where exactly is the problem? On Tue, 4 Dec 2018, 17:53 I can't authorize users at my project. If I'm going to login with > http://127.0.0.1:8000/account/login I'm redirecting to index page. > > -- > You received this message because you are subscribed to the G

Who use django-allauth!

2018-12-04 Thread kryakrya . it
I can't authorize users at my project. If I'm going to login with http://127.0.0.1:8000/account/login I'm redirecting to index page. -- 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 i

Re: PROBLEM 2

2018-12-04 Thread Ricardo Daniel Quiroga
Hi edit your urls.py and add polls view inside El mar., 4 dic. 2018 a las 8:44, David Figueroa (< davidfigueroalaf...@gmail.com>) escribió: > > > Em segunda-feira, 3 de dezembro de 2018 21:30:40 UTC-3, David Figueroa > escreveu: >> >> in the process of creating my first views I am having this pro

Re: PROBLEM 2

2018-12-04 Thread David Figueroa
Em segunda-feira, 3 de dezembro de 2018 21:30:40 UTC-3, David Figueroa escreveu: > > in the process of creating my first views I am having this problem when I > will check if everything is working well on the page > -- You received this message because you are subscribed to the Google Groups