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
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
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
*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
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.
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
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
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
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
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
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,
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
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
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
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
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')),
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
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
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
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
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
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
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
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
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
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
26 matches
Mail list logo