Re: Django apk

2019-06-12 Thread Lutalo Bbosa joseph
convert django application to progressive web app by using service workers
then this can run on any device be it android
or u search about converting PWA 2 APK  to make an apk

On Wed, Jun 12, 2019 at 7:01 PM Nebojsa Hajdukovic <
nebojsa.zero...@gmail.com> wrote:

> U can use django for beckend, and with rest api make apk with flutter,
> ionic etc
>
> sre, 12. jun 2019. 17:55 Kalathiappan  je
> napisao/la:
>
>> It is possible by anyway that an Django application could be converted
>> into an fully functional apk.
>>
>> --
>> 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@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/747d5600-dcfe-487e-80ce-6a4224b7bf5e%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJ60hW3uxBDWByXRs9vYo-VqbTYFSYxYNLY1etmhXXNrtyQuFw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DS7zcZ6JD%3D%2BWpHNcqz4r75QJJRi%2BTuAeToQN-bvCk7a8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django channel 2: do I have to prefix value of 'type' (the listening consumer method) of group_send with consumer class name if the consumer is a different one

2019-06-12 Thread Arean Bbay
Only the StudentConsumer has assignQuiz, the InstructorConsumer doesn't 
have.
So, you were saying so long as the method is invoked on the group that the 
StudentConsumer belongs to, there should be no problem?



On Wednesday, June 12, 2019 at 8:43:35 PM UTC-7, Ahmed Ishtiaque wrote:
>
> If my Channels 2 knowledge serves me right, your group names for these two 
> consumers should be unique. The group names should determine which 
> consumer's assignQuiz method is executed. 
>
> Hope this helps!
>
> On Wed, Jun 12, 2019 at 9:25 PM Arean Bbay  > wrote:
>
>> I have 2 consumers, namely StudentConsumer and InstructorConsumer.So if 
>> the url is:
>> ws://quizz_poll//student, it will be routed to the former.
>> otherwise ws://quizz_poll//instructor, then it will be routed to the 
>> latter.
>>
>> Within studentConsumer is a assignQuizzz(...) method. What I want to do 
>> is to  invoke that assignQuizz of student from instructor consumer using 
>> group_send.
>> The problem is I don't know how. Say if I only have one consumer, then I 
>> could do from the InstructorCousumer
>>
>>
>>
>>
>>
>> *self.channel_layer.group_send(group_name,
>> {"type": "assignQuizz","message": 
>> message,   }*
>> In my case do I just use "type" : "StudentConsumer.assignQuizz" ?
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/293849f4-eb39-468f-a3fd-961d19e1dad2%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a3cd6d78-57c9-42ae-a907-78b9220cfb44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django channel 2: do I have to prefix value of 'type' (the listening consumer method) of group_send with consumer class name if the consumer is a different one

2019-06-12 Thread Ahmed Ishtiaque
If my Channels 2 knowledge serves me right, your group names for these two
consumers should be unique. The group names should determine which
consumer's assignQuiz method is executed.

Hope this helps!

On Wed, Jun 12, 2019 at 9:25 PM Arean Bbay  wrote:

> I have 2 consumers, namely StudentConsumer and InstructorConsumer.So if
> the url is:
> ws://quizz_poll//student, it will be routed to the former.
> otherwise ws://quizz_poll//instructor, then it will be routed to the
> latter.
>
> Within studentConsumer is a assignQuizzz(...) method. What I want to do is
> to  invoke that assignQuizz of student from instructor consumer using
> group_send.
> The problem is I don't know how. Say if I only have one consumer, then I
> could do from the InstructorCousumer
>
>
>
>
>
> *self.channel_layer.group_send(group_name,
> {"type": "assignQuizz","message":
> message,   }*
> In my case do I just use "type" : "StudentConsumer.assignQuizz" ?
>
> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/293849f4-eb39-468f-a3fd-961d19e1dad2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKizqR5e6T-dYdpYeJGXOKd-dPmOAFKgsBW4PonDJ2HJfA2ufQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django channel 2: do I have to prefix value of 'type' (the listening consumer method) of group_send with consumer class name if the consumer is a different one

2019-06-12 Thread Arean Bbay
I have 2 consumers, namely StudentConsumer and InstructorConsumer.So if the 
url is:
ws://quizz_poll//student, it will be routed to the former.
otherwise ws://quizz_poll//instructor, then it will be routed to the latter.

Within studentConsumer is a assignQuizzz(...) method. What I want to do is 
to  invoke that assignQuizz of student from instructor consumer using 
group_send.
The problem is I don't know how. Say if I only have one consumer, then I 
could do from the InstructorCousumer





*self.channel_layer.group_send(group_name,
{"type": "assignQuizz","message": 
message,   }*
In my case do I just use "type" : "StudentConsumer.assignQuizz" ?

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/293849f4-eb39-468f-a3fd-961d19e1dad2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I send an outlook mail from angular using django

2019-06-12 Thread Taylor Hughes-Scott
I'm not so sure about sending outlook email through django. However i do
know django has a basic email sending built in have you had a look at that?
https://docs.djangoproject.com/en/2.2/topics/email/

On Thu., 13 Jun. 2019, 10:41 am Sai Aravind,  wrote:

> How can I send an outlook mail from angular using django can u please
> provide a y document for this
>
> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/711f3310-0b89-400e-adff-4aaf61e51cff%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAOisOJQGg05hZw98PQTHnbWVSfQQ9NERFccSm8ERJOqn5YirQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: parse xml from url to database

2019-06-12 Thread Taylor Hughes-Scott
Are you able to provide an example url or xml file. That would help to
figure out why no listings are created.


On Thu., 13 Jun. 2019, 9:04 am Ewen Le Bihan, 
wrote:

> Hi, where does prof.xml_ky comes from ?
>
> Le mercredi 12 juin 2019 18:22:01 UTC+2, Nuno Vieira a écrit :
>>
>> Hi there.
>>
>> I´m having some problems on parsing a real estate xml to database.
>> The user profile have url field to import properties automatically from
>> xml feed (url). The user can insert mannually or automatically, if the user
>> insert the url feed then it should be able to get the objects and save them
>> to mysql database automatically.
>> The function is not working and i do not know why, gives no error but
>> don´t populate the database.
>>
>> Models.py:
>> class Listing(models.Model):
>> '''Create table listing in db '''
>> realtor = models.ForeignKey(User, on_delete=models.CASCADE)
>> title = models.CharField(max_length=200)
>> address = models.CharField(max_length=200)
>> city = models.CharField(max_length=100)
>> state = models.CharField(max_length=100)
>> zipcode = models.CharField(max_length=20)
>> longitude = models.DecimalField(max_digits=9, decimal_places=6,default=0)
>> latitude = models.DecimalField(max_digits=9, decimal_places=6, default=0)
>> description = models.TextField(blank=True)
>> price = models.IntegerField()
>> bedrooms = models.IntegerField()
>> bathrooms = models.DecimalField(max_digits=2, decimal_places=1)
>> garage = models.IntegerField(default=0)
>> sqmt = models.IntegerField(blank=True)
>> lot_size = models.DecimalField(max_digits=5, decimal_places=1,blank=True)
>> On_Processing = 'On Processing'
>> AMais = 'A+'
>> A = 'A'
>> B = 'B'
>> BMenos = 'B-'
>> C = 'C'
>> D = 'D'
>> E = 'E'
>> F = 'F'
>> ENERGY_RATE_CHOICES = [
>> (On_Processing, 'On Processing'),
>> (AMais, 'A+'),
>> (A, 'A'),
>> (B, 'B'),
>> (BMenos, 'B-'),
>> (C, 'C'),
>> (D, 'D'),
>> (E, 'E'),
>> (F, 'F'),
>> ]
>> energy_rate = models.CharField(
>> max_length=12,
>> choices=ENERGY_RATE_CHOICES,
>> default=On_Processing,
>> )
>> photo_main = models.ImageField(upload_to='photos/%Y/%m/%d/', default=
>> 'default.jpg')
>> photo_main_url = models.URLField(blank = True)
>> is_published = models.BooleanField(default=True)
>> list_date = models.DateTimeField(default=datetime.now, blank=True)
>> video_url = models.CharField(max_length=100, blank=True)
>> virtual_tour = models.URLField(blank=True)
>> visit_num = models.PositiveIntegerField(default=0)
>>
>> def __str__(self):
>> return self.title
>>
>> def get_absolute_url(self):
>> return reverse('listing-detail', kwargs={'pk': self.pk})
>>
>> Function on xml_parse.py:
>> ...
>> import xml.etree.ElementTree as ET
>> import requests
>> from users.models import Profile
>>
>>
>> def xml_parse(self):
>> prof_list = Profile.objects.all()
>> for prof in prof_list:
>> if prof.xml_ky is not None:
>> url = xml_ky
>> response = request.get(url)
>> with open('xml/%s' % self.id + '/feed.xml', 'wb') as file:
>> file.write(response.content)
>>
>> tree = ET.parse('xml/%s' % self.id + '/feed.xml')
>> root = tree.getroot()
>> for props in root.iter('property'):
>> listing, created = Listing.object.create(
>> title = props.find('type').text + ' ' + props.find('town').text,
>> address = props.find('location_detail').text,
>> city = props.find('town').text,
>> state = props.find('province').text,
>> zipcode = props.find('zipcode').text,
>> loc = props.find('location'),
>> longitude = loc.find('longitude').text,
>> latitude = loc.find('latitude').text,
>> desc = props.find('desc'),
>> description = desc.find('en').text,
>> price = props.find('price').text,
>> bedrooms = props.find('beds').text,
>> bathrooms = props.find('baths').text,
>> garage = props.find('garage').text,
>> area = props.find('surface_area'),
>> sqmt = area.find('built').text,
>> energy_rate = props.find('energy_rate').text,
>> realtor = self.request.user,
>> img = props.find('images'),
>> image = img.get('id=1'),
>> image_url = image.find('url').text,
>> photo_main_url = image_url,
>> video_url = props.find('video_url').text,
>> virtual_tour = props.find('virtual_tour').text,
>> )
>> if created:
>> return listing.save()
>>
>>
>>
>> If you could help me and point me in the right direction it would be
>> great.
>>
>> Thanks and sorry for the black background!
>>
> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/20aa727c-d1e8-4d5f-a17d-ac17947ba5f3%40googlegroups.com
> 
> .
> For more options, visit 

How can I send an outlook mail from angular using django

2019-06-12 Thread Sai Aravind
How can I send an outlook mail from angular using django can u please provide a 
y document for this

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/711f3310-0b89-400e-adff-4aaf61e51cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: parse xml from url to database

2019-06-12 Thread Ewen Le Bihan
Hi, where does prof.xml_ky comes from ?

Le mercredi 12 juin 2019 18:22:01 UTC+2, Nuno Vieira a écrit :
>
> Hi there.
>
> I´m having some problems on parsing a real estate xml to database.
> The user profile have url field to import properties automatically from 
> xml feed (url). The user can insert mannually or automatically, if the user 
> insert the url feed then it should be able to get the objects and save them 
> to mysql database automatically.
> The function is not working and i do not know why, gives no error but 
> don´t populate the database.
>
> Models.py:
> class Listing(models.Model):
> '''Create table listing in db '''
> realtor = models.ForeignKey(User, on_delete=models.CASCADE)
> title = models.CharField(max_length=200)
> address = models.CharField(max_length=200)
> city = models.CharField(max_length=100)
> state = models.CharField(max_length=100)
> zipcode = models.CharField(max_length=20)
> longitude = models.DecimalField(max_digits=9, decimal_places=6,default=0)
> latitude = models.DecimalField(max_digits=9, decimal_places=6, default=0)
> description = models.TextField(blank=True)
> price = models.IntegerField()
> bedrooms = models.IntegerField()
> bathrooms = models.DecimalField(max_digits=2, decimal_places=1)
> garage = models.IntegerField(default=0)
> sqmt = models.IntegerField(blank=True)
> lot_size = models.DecimalField(max_digits=5, decimal_places=1,blank=True)
> On_Processing = 'On Processing'
> AMais = 'A+'
> A = 'A'
> B = 'B'
> BMenos = 'B-'
> C = 'C'
> D = 'D'
> E = 'E'
> F = 'F'
> ENERGY_RATE_CHOICES = [
> (On_Processing, 'On Processing'),
> (AMais, 'A+'),
> (A, 'A'),
> (B, 'B'),
> (BMenos, 'B-'),
> (C, 'C'),
> (D, 'D'),
> (E, 'E'),
> (F, 'F'),
> ]
> energy_rate = models.CharField(
> max_length=12,
> choices=ENERGY_RATE_CHOICES,
> default=On_Processing,
> )
> photo_main = models.ImageField(upload_to='photos/%Y/%m/%d/', default=
> 'default.jpg')
> photo_main_url = models.URLField(blank = True)
> is_published = models.BooleanField(default=True)
> list_date = models.DateTimeField(default=datetime.now, blank=True)
> video_url = models.CharField(max_length=100, blank=True) 
> virtual_tour = models.URLField(blank=True)
> visit_num = models.PositiveIntegerField(default=0)
>
> def __str__(self):
> return self.title
>
> def get_absolute_url(self):
> return reverse('listing-detail', kwargs={'pk': self.pk})
>
> Function on xml_parse.py:
> ...
> import xml.etree.ElementTree as ET
> import requests
> from users.models import Profile
>
>
> def xml_parse(self):
> prof_list = Profile.objects.all()
> for prof in prof_list:
> if prof.xml_ky is not None:
> url = xml_ky
> response = request.get(url)
> with open('xml/%s' % self.id + '/feed.xml', 'wb') as file:
> file.write(response.content)
>
> tree = ET.parse('xml/%s' % self.id + '/feed.xml')
> root = tree.getroot()
> for props in root.iter('property'): 
> listing, created = Listing.object.create(
> title = props.find('type').text + ' ' + props.find('town').text,
> address = props.find('location_detail').text,
> city = props.find('town').text, 
> state = props.find('province').text,
> zipcode = props.find('zipcode').text,
> loc = props.find('location'),
> longitude = loc.find('longitude').text,
> latitude = loc.find('latitude').text,
> desc = props.find('desc'),
> description = desc.find('en').text, 
> price = props.find('price').text, 
> bedrooms = props.find('beds').text,
> bathrooms = props.find('baths').text,
> garage = props.find('garage').text, 
> area = props.find('surface_area'),
> sqmt = area.find('built').text,
> energy_rate = props.find('energy_rate').text,
> realtor = self.request.user,
> img = props.find('images'),
> image = img.get('id=1'), 
> image_url = image.find('url').text,
> photo_main_url = image_url,
> video_url = props.find('video_url').text,
> virtual_tour = props.find('virtual_tour').text,
> )
> if created:
> return listing.save()
>
>
>
> If you could help me and point me in the right direction it would be great.
>
> Thanks and sorry for the black background!
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20aa727c-d1e8-4d5f-a17d-ac17947ba5f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-12 Thread James Farris
This python package may be a better choice for you, since I assume you want
all user generated content (images) to be stored in Dropbox.

This has pretty good documentation.
https://pypi.org/project/django-dropbox-storage/

If you use this package, remove the sample code I sent


On Wed, Jun 12, 2019 at 3:53 PM omar ahmed  wrote:

> i added this function at the end of views.py file
> def connect_to_dropbox():
> dbx = dropbox.Dropbox(‘your access token)
> dbx.users_get_current_account()
> and i put given access token from dropbox
> then what about call
> do you mean in any view function that will show page included images add
> connect_to_dropbox()
> and what about
>
> for entry in dbx.files_list_folder('').entries:
> print(entry.name)
>
>
>
> On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
>>
>> You would add this code to the views.py file, which is where the business
>> logic goes.
>>
>> https://docs.djangoproject.com/en/2.2/topics/http/views/
>>
>> Likely would add a class with properties and methods or a definition (a
>> function) like below:
>>
>> For example in your apps views.py file:
>>
>> def connect_to_dropbox():
>> dbx = dropbox.Dropbox(‘your access token)
>> dbx.users_get_current_account()
>>
>> # this stuff likely would go in a separate function
>> for entry in dbx.files_list_folder(‘’).entries:
>> print(entry.name)
>>
>>
>> At some point in your code you would call the function:
>> connect_to_dropbox()
>>
>> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:
>>
>>> i opened the documentation for django-storages ... and i installed
>>> Dropbox in my environment and i created my app folder  but i didn't
>>> complete docs .
>>> somethings not clear ... like :
>>> Link an account
>>>
>>> dbx = dropbox.Dropbox('YOUR_ACCESS_TOKEN')
>>>
>>> dbx.users_get_current_account()
>>> Try some API requests
>>>
>>> for entry in dbx.files_list_folder('').entries:
>>> print(entry.name)
>>>
>>> where should i write these commands ?
>>> thanks
>>>
>>> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:

 You might try the docs from Dropbox
 https://www.dropbox.com/developers/documentation/python#overview

 You can checkout this project for ideas
 https://github.com/singingwolfboy/django-with-dropbox

 and here is documentation for django-storages
 https://django-storages.readthedocs.io/en/latest/backends/dropbox.html



 On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:

> yes James you are right i need to upload images using the Django
> admin, ... how can i use Dropbox for this issue ?
> i need a good tutorial
>
> On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote:
>>
>> He is saying these aren’t static files. It sounds like he uploads
>> them using the Django admin, which of course is like an end user on a
>> client uploading files to the media directory.
>>
>> Since that is the case it sounds like the Dropbox option is the best.
>> Documentation was provided earlier. So being that it seems like he read
>> through the documentation, my question is where is he stuck in the 
>> Dropbox
>> implementation?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> django...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com
>>> 
>>> .
>>> For more options, visit 

Re: my file uploads missing/deleted

2019-06-12 Thread omar ahmed
i added this function at the end of views.py file 
def connect_to_dropbox():
dbx = dropbox.Dropbox(‘your access token)
dbx.users_get_current_account()
and i put given access token from dropbox
then what about call
do you mean in any view function that will show page included images add  
connect_to_dropbox()
and what about 

for entry in dbx.files_list_folder('').entries:
print(entry.name)



On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
>
> You would add this code to the views.py file, which is where the business 
> logic goes. 
>
> https://docs.djangoproject.com/en/2.2/topics/http/views/
>
> Likely would add a class with properties and methods or a definition (a 
> function) like below:
>
> For example in your apps views.py file:
>
> def connect_to_dropbox():
> dbx = dropbox.Dropbox(‘your access token)
> dbx.users_get_current_account()
>
> # this stuff likely would go in a separate function
> for entry in dbx.files_list_folder(‘’).entries:
> print(entry.name)
>
>
> At some point in your code you would call the function:
> connect_to_dropbox()
>
> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  > wrote:
>
>> i opened the documentation for django-storages ... and i installed 
>> Dropbox in my environment and i created my app folder  but i didn't 
>> complete docs .
>> somethings not clear ... like :
>> Link an account 
>>
>> dbx = dropbox.Dropbox('YOUR_ACCESS_TOKEN')
>>
>> dbx.users_get_current_account()
>> Try some API requests
>>
>> for entry in dbx.files_list_folder('').entries:
>> print(entry.name)
>>
>> where should i write these commands ?
>> thanks
>>
>> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>>>
>>> You might try the docs from Dropbox
>>> https://www.dropbox.com/developers/documentation/python#overview
>>>
>>> You can checkout this project for ideas
>>> https://github.com/singingwolfboy/django-with-dropbox
>>>
>>> and here is documentation for django-storages
>>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>>
>>>
>>>
>>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:
>>>
 yes James you are right i need to upload images using the Django 
 admin, ... how can i use Dropbox for this issue ? 
 i need a good tutorial

 On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote:
>
> He is saying these aren’t static files. It sounds like he uploads them 
> using the Django admin, which of course is like an end user on a client 
> uploading files to the media directory. 
>
> Since that is the case it sounds like the Dropbox option is the best. 
> Documentation was provided earlier. So being that it seems like he read 
> through the documentation, my question is where is he stuck in the 
> Dropbox 
> implementation?

 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 django...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> *James Farris*
> Web Application Developer | Web and Digital Solutions
> External Relations & Advancement Marketing Communications
> University Development and Alumni Relations | UC Berkeley
> 510-664-4512 | jfa...@berkeley.edu 
>
>
>

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

Re: my file uploads missing/deleted

2019-06-12 Thread James Farris
You would add this code to the views.py file, which is where the business
logic goes.

https://docs.djangoproject.com/en/2.2/topics/http/views/

Likely would add a class with properties and methods or a definition (a
function) like below:

For example in your apps views.py file:

def connect_to_dropbox():
dbx = dropbox.Dropbox(‘your access token)
dbx.users_get_current_account()

# this stuff likely would go in a separate function
for entry in dbx.files_list_folder(‘’).entries:
print(entry.name)


At some point in your code you would call the function:
connect_to_dropbox()

On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:

> i opened the documentation for django-storages ... and i installed Dropbox
> in my environment and i created my app folder  but i didn't complete docs .
> somethings not clear ... like :
> Link an account
>
> dbx = dropbox.Dropbox('YOUR_ACCESS_TOKEN')
>
> dbx.users_get_current_account()
> Try some API requests
>
> for entry in dbx.files_list_folder('').entries:
> print(entry.name)
>
> where should i write these commands ?
> thanks
>
> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>>
>> You might try the docs from Dropbox
>> https://www.dropbox.com/developers/documentation/python#overview
>>
>> You can checkout this project for ideas
>> https://github.com/singingwolfboy/django-with-dropbox
>>
>> and here is documentation for django-storages
>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>
>>
>>
>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:
>>
>>> yes James you are right i need to upload images using the Django
>>> admin, ... how can i use Dropbox for this issue ?
>>> i need a good tutorial
>>>
>>> On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote:

 He is saying these aren’t static files. It sounds like he uploads them
 using the Django admin, which of course is like an end user on a client
 uploading files to the media directory.

 Since that is the case it sounds like the Dropbox option is the best.
 Documentation was provided earlier. So being that it seems like he read
 through the documentation, my question is where is he stuck in the Dropbox
 implementation?
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
*James Farris*
Web Application Developer | Web and Digital Solutions
External Relations & Advancement Marketing Communications
University Development and Alumni Relations | UC Berkeley
510-664-4512 | jfar...@berkeley.edu

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMdMWAXKSRpKu6BA%2BzZSETp6sd6yN3WL7NnYVm%2BCxYKgN3ogBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-12 Thread omar ahmed
i opened the documentation for django-storages ... and i installed Dropbox 
in my environment and i created my app folder  but i didn't complete docs .
somethings not clear ... like :
Link an account 

dbx = dropbox.Dropbox('YOUR_ACCESS_TOKEN')

dbx.users_get_current_account()
Try some API requests

for entry in dbx.files_list_folder('').entries:
print(entry.name)

where should i write these commands ?
thanks

On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>
> You might try the docs from Dropbox
> https://www.dropbox.com/developers/documentation/python#overview
>
> You can checkout this project for ideas
> https://github.com/singingwolfboy/django-with-dropbox
>
> and here is documentation for django-storages
> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>
>
>
> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  > wrote:
>
>> yes James you are right i need to upload images using the Django 
>> admin, ... how can i use Dropbox for this issue ? 
>> i need a good tutorial
>>
>> On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote:
>>>
>>> He is saying these aren’t static files. It sounds like he uploads them 
>>> using the Django admin, which of course is like an end user on a client 
>>> uploading files to the media directory. 
>>>
>>> Since that is the case it sounds like the Dropbox option is the best. 
>>> Documentation was provided earlier. So being that it seems like he read 
>>> through the documentation, my question is where is he stuck in the Dropbox 
>>> implementation?
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-12 Thread omar ahmed
can django-imagekit upload my images without (Dropbox or AWS s3 ) ?


On Wednesday, June 12, 2019 at 4:34:23 PM UTC+2, Joe Reitman wrote:
>
> Omar,
>
> To upload images from the Admin panel, you will have to configure your 
> apps' admin.py file. I use the django-imagekit package to manipulate user 
> uploaded images. This package also provides the ability to upload images 
> via the Admin panel with a couple lines of code. Here is my Admin.py code. 
>
> from django.contrib import admin
> from imagekit.admin import AdminThumbnail
> from .models import MapData
>
>
> class PhotoAdmin(admin.ModelAdmin):
>
>  list_display = ('__str__', 'admin_thumbnail')
>  admin_thumbnail = AdminThumbnail(image_field='image')
>
>
> admin.site.register(MapData, PhotoAdmin) 
>
>
>
> It displays thumbnails of all the images stored in my database and 
> presents them in a list view in the Admin panel alongside the other model 
> data.
>
> On Tuesday, June 11, 2019 at 4:16:43 PM UTC-5, omar ahmed wrote:
>>
>> yes James you are right i need to upload images using the Django 
>> admin, ... how can i use Dropbox for this issue ? 
>> i need a good tutorial
>>
>> On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote:
>>>
>>> He is saying these aren’t static files. It sounds like he uploads them 
>>> using the Django admin, which of course is like an end user on a client 
>>> uploading files to the media directory. 
>>>
>>> Since that is the case it sounds like the Dropbox option is the best. 
>>> Documentation was provided earlier. So being that it seems like he read 
>>> through the documentation, my question is where is he stuck in the Dropbox 
>>> implementation?
>>
>>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/247e5719-c312-4803-a3a0-ec77b6f79141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Confused with deleted migrations

2019-06-12 Thread Mohammad Etemaddar
Hey folks
After uploading the app to the server, I got problems by local migrations 
in development. So deleted the migrations and local sqlite db (Server uses 
MySQL).
After more development, uploaded the whole project to the server and 
overwrite the files. And typed migrate on server. I don't know what 
happened to the database. Some new tables seems to be created (or not). I 
got really confused with this situation. It is much confusing to get backup 
from server's data and then restore them back.
What is your opinion?

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d050785c-3924-40cb-8c9c-2b878dda4ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


parse xml from url to database

2019-06-12 Thread Nuno Vieira
Hi there.

I´m having some problems on parsing a real estate xml to database.
The user profile have url field to import properties automatically from xml 
feed (url). The user can insert mannually or automatically, if the user 
insert the url feed then it should be able to get the objects and save them 
to mysql database automatically.
The function is not working and i do not know why, gives no error but don´t 
populate the database.

Models.py:
class Listing(models.Model):
'''Create table listing in db '''
realtor = models.ForeignKey(User, on_delete=models.CASCADE)
title = models.CharField(max_length=200)
address = models.CharField(max_length=200)
city = models.CharField(max_length=100)
state = models.CharField(max_length=100)
zipcode = models.CharField(max_length=20)
longitude = models.DecimalField(max_digits=9, decimal_places=6,default=0)
latitude = models.DecimalField(max_digits=9, decimal_places=6, default=0)
description = models.TextField(blank=True)
price = models.IntegerField()
bedrooms = models.IntegerField()
bathrooms = models.DecimalField(max_digits=2, decimal_places=1)
garage = models.IntegerField(default=0)
sqmt = models.IntegerField(blank=True)
lot_size = models.DecimalField(max_digits=5, decimal_places=1,blank=True)
On_Processing = 'On Processing'
AMais = 'A+'
A = 'A'
B = 'B'
BMenos = 'B-'
C = 'C'
D = 'D'
E = 'E'
F = 'F'
ENERGY_RATE_CHOICES = [
(On_Processing, 'On Processing'),
(AMais, 'A+'),
(A, 'A'),
(B, 'B'),
(BMenos, 'B-'),
(C, 'C'),
(D, 'D'),
(E, 'E'),
(F, 'F'),
]
energy_rate = models.CharField(
max_length=12,
choices=ENERGY_RATE_CHOICES,
default=On_Processing,
)
photo_main = models.ImageField(upload_to='photos/%Y/%m/%d/', default=
'default.jpg')
photo_main_url = models.URLField(blank = True)
is_published = models.BooleanField(default=True)
list_date = models.DateTimeField(default=datetime.now, blank=True)
video_url = models.CharField(max_length=100, blank=True) 
virtual_tour = models.URLField(blank=True)
visit_num = models.PositiveIntegerField(default=0)

def __str__(self):
return self.title

def get_absolute_url(self):
return reverse('listing-detail', kwargs={'pk': self.pk})

Function on xml_parse.py:
...
import xml.etree.ElementTree as ET
import requests
from users.models import Profile


def xml_parse(self):
prof_list = Profile.objects.all()
for prof in prof_list:
if prof.xml_ky is not None:
url = xml_ky
response = request.get(url)
with open('xml/%s' % self.id + '/feed.xml', 'wb') as file:
file.write(response.content)

tree = ET.parse('xml/%s' % self.id + '/feed.xml')
root = tree.getroot()
for props in root.iter('property'): 
listing, created = Listing.object.create(
title = props.find('type').text + ' ' + props.find('town').text,
address = props.find('location_detail').text,
city = props.find('town').text, 
state = props.find('province').text,
zipcode = props.find('zipcode').text,
loc = props.find('location'),
longitude = loc.find('longitude').text,
latitude = loc.find('latitude').text,
desc = props.find('desc'),
description = desc.find('en').text, 
price = props.find('price').text, 
bedrooms = props.find('beds').text,
bathrooms = props.find('baths').text,
garage = props.find('garage').text, 
area = props.find('surface_area'),
sqmt = area.find('built').text,
energy_rate = props.find('energy_rate').text,
realtor = self.request.user,
img = props.find('images'),
image = img.get('id=1'), 
image_url = image.find('url').text,
photo_main_url = image_url,
video_url = props.find('video_url').text,
virtual_tour = props.find('virtual_tour').text,
)
if created:
return listing.save()



If you could help me and point me in the right direction it would be great.

Thanks and sorry for the black background!

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f00d6ae6-eb29-462d-ab48-3384848d3514%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django apk

2019-06-12 Thread Nebojsa Hajdukovic
U can use django for beckend, and with rest api make apk with flutter,
ionic etc

sre, 12. jun 2019. 17:55 Kalathiappan  je
napisao/la:

> It is possible by anyway that an Django application could be converted
> into an fully functional apk.
>
> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/747d5600-dcfe-487e-80ce-6a4224b7bf5e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ60hW3uxBDWByXRs9vYo-VqbTYFSYxYNLY1etmhXXNrtyQuFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django apk

2019-06-12 Thread Kalathiappan
It is possible by anyway that an Django application could be converted into 
an fully functional apk.

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/747d5600-dcfe-487e-80ce-6a4224b7bf5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Djano rest api

2019-06-12 Thread Ahmed Ishtiaque
I think DRF  has pretty good
examples of API designs, even though I can't point you to a specifically
constructed API for you to look at.

On Wed, Jun 12, 2019 at 10:23 AM Rob W  wrote:

> Hi all,
>
> I need to see a django rest api, with proper endpoint design - REST-ish
> by using paths, HTTP methods, response codes, JSONs, errors returned in
> JSON,
>
> Anyone have this already completed that I can take a look at?
>
> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/DE361A10-F522-421D-94EC-56473F1D01FA%40gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKizqR59sgYxW75gdNyCz7c0SCLSX5B1DHZj6zEeNQvNsxWnqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-12 Thread Joe Reitman
Omar,

To upload images from the Admin panel, you will have to configure your 
apps' admin.py file. I use the django-imagekit package to manipulate user 
uploaded images. This package also provides the ability to upload images 
via the Admin panel with a couple lines of code. Here is my Admin.py code. 

from django.contrib import admin
from imagekit.admin import AdminThumbnail
from .models import MapData


class PhotoAdmin(admin.ModelAdmin):

 list_display = ('__str__', 'admin_thumbnail')
 admin_thumbnail = AdminThumbnail(image_field='image')


admin.site.register(MapData, PhotoAdmin) 



It displays thumbnails of all the images stored in my database and presents 
them in a list view in the Admin panel alongside the other model data.

On Tuesday, June 11, 2019 at 4:16:43 PM UTC-5, omar ahmed wrote:
>
> yes James you are right i need to upload images using the Django 
> admin, ... how can i use Dropbox for this issue ? 
> i need a good tutorial
>
> On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote:
>>
>> He is saying these aren’t static files. It sounds like he uploads them 
>> using the Django admin, which of course is like an end user on a client 
>> uploading files to the media directory. 
>>
>> Since that is the case it sounds like the Dropbox option is the best. 
>> Documentation was provided earlier. So being that it seems like he read 
>> through the documentation, my question is where is he stuck in the Dropbox 
>> implementation?
>
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7e689c03-572f-46e5-ae4d-247141653a55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Djano rest api

2019-06-12 Thread Rob W
Hi all,

I need to see a django rest api, with proper endpoint design - REST-ish by 
using paths, HTTP methods, response codes, JSONs, errors returned in JSON,

Anyone have this already completed that I can take a look at?

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DE361A10-F522-421D-94EC-56473F1D01FA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Server Setup Error

2019-06-12 Thread Soumen Khatua
Hi Folks,
After run this command:   sudo systemctl status gunicorn

















*● gunicorn.service - gunicorn daemon   Loaded: loaded
(/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Wed 2019-06-12 14:01:44 UTC;
10min ago  Process: 20765 ExecStart=/home/sai/myproject/env/bin/gunicorn
--access-logfile - --workers 3 --bind
unix:/home/sai/myproject/gunicorn.sock clothproject1.wsgi:applica Main PID:
20765 (code=exited, status=1/FAILURE)Jun 12 14:01:44 sai-foundation
gunicorn[20765]: self.stop()Jun 12 14:01:44 sai-foundation
gunicorn[20765]:   File
"/home/sai/myproject/env/lib/python3.6/site-packages/gunicorn/arbiter.py",
line 393, in stopJun 12 14:01:44 sai-foundation gunicorn[20765]:
time.sleep(0.1)Jun 12 14:01:44 sai-foundation gunicorn[20765]:   File
"/home/sai/myproject/env/lib/python3.6/site-packages/gunicorn/arbiter.py",
line 245, in handle_chldJun 12 14:01:44 sai-foundation gunicorn[20765]:
self.reap_workers()Jun 12 14:01:44 sai-foundation gunicorn[20765]:   File
"/home/sai/myproject/env/lib/python3.6/site-packages/gunicorn/arbiter.py",
line 525, in reap_workersJun 12 14:01:44 sai-foundation gunicorn[20765]:
  raise HaltServer(reason, self.WORKER_BOOT_ERROR)Jun 12 14:01:44
sai-foundation gunicorn[20765]: gunicorn.errors.HaltServer: Jun 12 14:01:44 sai-foundation systemd[1]:
gunicorn.service: Main process exited, code=exited, status=1/FAILUREJun 12
14:01:44 sai-foundation systemd[1]: gunicorn.service: Failed with result
'exit-code'.lines 1-16/16 (END)*


please help me guys if you know this solutions?

Thank You

Regards,
Soumen

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WZFXvvW9BvVtxN4rMb5VEBGByRoPmajGOg-Eq0MBx%2Bf9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: mysqlclient installation error

2019-06-12 Thread Emmanuel Simeon

 Links to resources I used to help me get MySQL working on Django

Visual Studio Build Tools Installer  - Link 


MySQL DB and Connectors Web Installer  - Link 

(I downloaded the complete package and installed everything including all 
the connectors)

And lastly which was like the trick that worked for me:
I uninstalled Python and used the python web installer to get the latest 
version of python.

PS: Something to be considered what's your system architecture if 
32bit(x86) / 64bit(x64)

Choose the software build for your system architecture to be installed.

For instance:

I installed 64bit Python 3.7
same with my MySQL, I installed 64bit 
Because there are dependencies those software look for in certain places.

I truly hope this works for You,

Also when installing mysqlclient I didn't specify a version, I just did 
"pip install mysqlclient"

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/896a9747-8446-4163-a8c0-c421ba2b2192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do you make a public user create polls on the site not just the admin

2019-06-12 Thread Babatunde Akinyanmi
Hello Progress.
Just like how you fill out a form in the Admin site, you should also create
a form in your site.

On Mon, 10 Jun 2019, 12:18 Progress Onyema, 
wrote:

> --
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a4345d81-d7c6-43d5-9c47-df2181690d09%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMsYbv-owBBjN40GpNBnxs0iivKV1WMJgBBEc-iPB1nhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: search bar

2019-06-12 Thread Derek
Here is good place to get started:

https://wsvincent.com/django-search/

You can then expand what has been shown here by adding extra UI-side 
functions such as drop-down fields that will allow a user to refine what is 
being searched for. (Maybe you can even write your own tutorial after you 
have done that.)

There is also a Django app that may be useful:

https://github.com/gregplaysguitar/django-simple-search


On Monday, 10 June 2019 04:49:35 UTC+2, Pradeep Singh wrote:
>
> how to make drop down based search bar in django . where user can select 
> particular field and then retrieve data 
>
> ex- realestate ..
>
> anyone can help me to make such type of search bar 
>

-- 
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@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bc76ea41-3127-435a-8d00-4baeaf9af513%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.