Debug False

2020-12-14 Thread Ronak Mistry
When i set debug to false the server respond with internal server error 500
on local host.
Also i had installed whitenoise, gunicorn an in allowed hosts i put "*"
When i go to admin site it works perfectly fine...

But when debug is set to true everything works perfectly fine..
Can anyone give me any solution...?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BAL0Avu-R0dQxeAsTOeOjA0mi_NSSDffU%3Dv1pkFsaekhmQcxg%40mail.gmail.com.


Re: Migration of database

2020-12-14 Thread Omkar Parab
Check out this video. 
https://youtu.be/6DI_7Zja8Zc

On Tue, Dec 15, 2020, 12:09 PM Dhruvil Shah  wrote:

> I have already made my project in Django and used built-in database Sqlite
> and now I want it in production on heroku so how can I switch all data from
> Sqlite database to Postgresql database?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADsP_iywX5jsBNRsoSgtPZtzgDD3befGdJgjWL-XgZi-feRdAA%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJY8mfyKgnhPUNL6dbLcsZgMK%2BEQ2aQnt7B0wUOEu1thi33%3Dpw%40mail.gmail.com.


Migration of database

2020-12-14 Thread Dhruvil Shah
I have already made my project in Django and used built-in database Sqlite
and now I want it in production on heroku so how can I switch all data from
Sqlite database to Postgresql database?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADsP_iywX5jsBNRsoSgtPZtzgDD3befGdJgjWL-XgZi-feRdAA%40mail.gmail.com.


Re: Python Django Training

2020-12-14 Thread Eugene TUYIZERE
add me please

On Mon, 7 Dec 2020 at 10:10, narendra thapa 
wrote:

> hello please add me also in training group?
>
>
> On Fri, Feb 21, 2020 at 7:27 PM Bharati Nilam 
> wrote:
>
>> Hi,
>> I also from Hyderabad and I'm also interested in the training. please
>> tell me how to join?
>>
>> Regards,
>> Bharati
>>
>> On Thu, 20 Feb, 2020, 6:19 PM Thiagu Palaniappan, <
>> thiagarajan@gmail.com> wrote:
>>
>>> I'm also interested. Please add me in the group.
>>>
>>>
>>> Thanks & Regards,
>>> Thiagu
>>>
>>> On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul 
>>> wrote:
>>>
 I am interested also. Please let me know the details.

 On Sat 1 Feb, 2020, 2:42 PM Srikanth K,  wrote:

> Hi,
>
> I am from Hyderabad. I am Python Developer by Profession. I am eager
> take up any Python , Django Training (online Preferrable or Weekends).
> Members who require can contact me or share me  there idea.
>
> Regards,
> Srikanth.K
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%40mail.gmail.com
> 
> .
>
 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com
 
 .

>>>
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> *Thiagu Palaniappan*
>>>
>>> M +91 (0) 9994318799
>>>
>>> *DXC Technology*
>>> 8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam
>>> post, Ramapuram, Chennai - 600 089.
>>>
>>> dxc.technology  / Twitter
>>>  / Facebook
>>>  / LinkedIn
>>> 
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAK%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPGVBeOgomb94NXAm347QqGcJ%3D3MzxULU7eQnY-M56EbC2D9vg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEtntjXVaVAyDCJJzS748zfNVm242U%2B6vsFkynevf5ghnPgDhw%40mail.gmail.com
> 
> .
>


-- 
*TUYIZERE Eugene*



*Msc Degree in Mathematical Science*

*African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
Garden-Lime, Cameroon*

Bsc in Computer Science

*UR-Nyagatare Campus*

Email: eugene.tuyiz...@aims-cameroon.org
   eugenetuyiz...@gmail.com

Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

-- 
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 view this discussion on the web visit 

Re: How to securely store passwords used in backend code

2020-12-14 Thread David Nugent
On 10 December 2020 at 01:18:16, Pankaj Jangid (pan...@codeisgreat.org)
wrote:

Fenrir Sivar  writes:

> I inherited a django app that calls private APIs in a view to fetch some
> data. The credentials or api keys are currently hardcoded in the source,
> making it difficult to share.
> What is the preferred way to store these kind of keys in a secure way only

> accessible to the django server?

As Kasper suggests, I also use environment variables in development
environment. But a few more things add up to convenience.

Not only convenience, but a very good idea. First and foremost, keep
secrets out of configuration even gitignore'd ones, with .env files being
the exception.

The environment is not a perfect place to store these but they are better
then placing them in code or configuration.

For more info and a very tried and tested approach, check out
https://12factor.net/


1. I use ‘direnv’ for managing per directory environment variables. As I
enter a perticular directory (on terminal), it echos the newly set
environment variables.

Seconded ... and thirded!

If you use .env files you can even suck these in automatically, set your
virtualenv and any configuration information in your .envrc. It is a really
good approach especially so i you work on multiple projects and don't want
to clutter your .*profile or Windows global env.


2. It might be overkill but I use Docker on my development machine. And
I use the same environment variables in my docker-compose.yml. This
is also useful in production setup where you are deploying in Docker.


I would argue that this is definitely NOT an overkill unless you're
entirely unfamiliar with container technology when it would become another
burden in the path to understanding.

Running your code in a container when it is to be deployed in production in
a container is very important to avoid pitfalls such as local dependencies
of all sorts. "it works here" but fails in production is definitely
something you want to avoid.  You can mount your development environment
locally and run the server within the container and all is good, although
this does raise some interesting challenges if you want to debug the
server...

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPvfA9A1zjp76qNf%2BN0QgacHuSzT0LQ246hFHoJCb7Bj1m1tYg%40mail.gmail.com.


ForeignKey with different queryset from manager

2020-12-14 Thread Jimmy Gawain
This is with Django v2.2.

We use tombstoning via a custom BaseModelManager to mark items as deleted 
in the database but keep them around for reference.

class BaseModelManager(models.Manager):
def __init__(self, *args, **kwargs):
self.include_tombstoned = kwargs.pop('include_tombstoned',False)
super(BaseModelManager, self).__init__(*args, **kwargs)

def get_queryset(self):
if not self.include_tombstoned:
return 
TombstonedQuerySet(self.model).filter(is_tombstoned=False)
return TombstonedQuerySet(self.model)

class BaseModel(models.Model):
def __init__(self, *args, **kwargs):
super(BaseModel, self).__init__(*args, **kwargs)

# manager
objects = BaseModelManager()
all_objects = BaseModelManager(include_tombstoned=True)

This way models can reference Model.objects when they want undeleted items 
and Model.all_objects when they want to included deleted items.

We now have a situation where we want a ForeignKey, which uses objects, to 
use all_objects instead.

That is instead of this:

ref_member = models.ForeignKey(Member, related_name='+', null=True, 
blank=True, on_delete=models.CASCADE)

Do something like this:

ref_member = models.ForeignKey(Member, *queryset=Member.all_objects.all()*, 
related_name='+', null=True, blank=True, on_delete=models.CASCADE)

Is there any way to do the equivalent of this?

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4ee488b1-3489-430d-b917-70c157b35a92n%40googlegroups.com.


Joining two unrelated tables via the ORM with m-to-m relationship?

2020-12-14 Thread Sam Clark
I have a design/approach question, I think it boils down to needing to join
two tables on multiple fields, where the tables are not linked via a
foreignkey.  However I'm open to any suggestions on rethinking the overall
approach to it. Here's what I'm trying to accomplish.


I have a model with fields [provider], [sheetid], [line], [column],
[value].


I would like to maintain a list of filter criteria like [filterSheet],
[filterRow], [filterColumn]. There could be 1 set of these filters, or
many. I'd like to query the main model for any values that match a filter
criteria record on sheet and row and column.


I'd like the list of filter criteria to be user maintainable, to grow over
time, so it seems to me it might be best to maintain this as a separate
model/table that users could easily add to, rather than something like a
hard coded list of tuples.  So for models, I have something like this:


class crSummary(models:Model):

submitterID =  models.CharField(max_length = 6, unique=True)

 


class crDetail(models.Model):

 crsum = models.ForeignKey('crSummary', on_delete=models.CASCADE)

 sheetid = models.CharField(max_length = 7)

 line = models.DecimalField(max_digits = 5, decimal_places=2)

 column = models.DecimalField(max_digits = 5, decimal_places=2)

 value = models.DecimalField(max_digits = 11, decimal_places=2)


class tentFilter(models.Model):

 filterSheet = models.CharField(max_length =7)

 filterLine = models.DecimalField(max_digits = 5, decimal_places=2)

 filterColumn = models.DecimalField(max_digits = 5, decimal_places=2)



I can do a sql join using .raw() to join the crDetail and tentFilter tables
... "on sheetid=filterSheet and line=filterLine and column=filterColumn".
However I'm curious if there's a way to accomplish this using the ORM?  I
found "ForeignObject" but it doesn't work in this scenario as the sheetid,
line, column fields are not unique (any provider could potentially have a
given sheet, line, column combination which I am trying to extract via the
filter).


Is there a way to achieve ForeignObject type functionality but with many to
many relationships?


Any help would be greatly appreciated.  Thanks!


-Sam

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC1pHu4TzbJ6qM%2Br7MavML6eASajSWF9vf39iiAoTQ2FSdbJvw%40mail.gmail.com.


Re: My replies are not reaching the list

2020-12-14 Thread Ari Davidow
The list is more likely set up not to send your own responses to you. In
any event, this one message certainly reached the list.

On Mon, Dec 14, 2020, 12:48 PM Pankaj Jangid  wrote:

> Last time I posted a reply and it did not reach the list. This message
> is just to check if my posts are reaching here. Forgive me for the
> broadcast. But there is no way to contact the list owner/moderator.
>
> Regards
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/87zh2g700u.fsf%40codeisgreat.org
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF%2BxBDVWHByix9mrqn9NzBFiHEYHTyU0JjyVLuG6MztcwFiZHA%40mail.gmail.com.


Re: Handle timeseries, how to model ?

2020-12-14 Thread Derek
Hi

I am not sure about the links with Django, but we have found that 
TimescaleDB extension for Postgresql is a very powerful tool for managing 
and extracting analytics from  timeseries data.  Some further reading to 
see if this fits your use case:

https://stackoverflow.com/questions/25212009/django-postgres-large-time-series

https://medium.com/smart-digital-garden/timescaledb-and-django-5f2640b28ef1

https://pypi.org/project/django-timescaledb/

https://docs.timescale.com/latest/using-timescaledb

Derek

On Sunday, 13 December 2020 at 18:35:58 UTC+2 Franck DG wrote:

> Hello,
> I am looking for best practices in managing the registration of 
> timeseries. I cannot find a satisfactory model for Django. The problem is 
> to model a driving simulator made up of a steering wheel, brake pedal, 
> clutch, gear lever, ... Following a session, the machine provides a file 
> with the times when the elements were used. Ex: the brake pedal was used at 
> 30, 35, 50, 300 sec ... First gear increased to 5, 60, 300 sec ... There 
> are several users, several machines and a user can do one or more sessions 
> per day on any machine. All this must be recorded - a posteriori therefore 
> - in a database in order to then use the data. Counting of events between 2 
> times, frequencies, evolution between sessions, ... I can't find the most 
> efficient way to model this into objects. If anyone can help me that would 
> be great, 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4245f742-8acd-4cd5-a113-a047ee267814n%40googlegroups.com.


My replies are not reaching the list

2020-12-14 Thread Pankaj Jangid
Last time I posted a reply and it did not reach the list. This message
is just to check if my posts are reaching here. Forgive me for the
broadcast. But there is no way to contact the list owner/moderator.

Regards

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/87zh2g700u.fsf%40codeisgreat.org.


Re: FastCGI with recent Drjango?

2020-12-14 Thread esse garthey
Le 13 déc. 2020 17:09, "Tim Chase"  a écrit
:

At one point in history long past, Django 1.8 supported FastCGI via
flup

https://docs.djangoproject.com/en/1.8/howto/deployment/fastcgi/

but it was slated to be removed in 1.9 and there seem to be no
further docs I can disinter about running Django in a FastCGI
environment (all other resources I turned up are of a similar
vintage).

Is there a recommended way to run Django in a FastCGI environment
these days?

I ask largely because OpenBSD's stock `httpd` supports CGI and
FastCGI but not WSGI or other such interfaces.  Push come to shove, I
could end up using relayd/httpd as a fronting proxy to some
intermediate server (like uWSGI or gunicorn?).  If even that causes
issues, I *can* switch to nginx, but would prefer to stick with as
much software in the base install if possible.

Thanks,

-tkc






-- 
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 view this discussion on the web visit https://groups.google.com/d/
msgid/django-users/20201213110941.661cf166%40bigbox.attlocal.net.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACq8Q8c8MLXfAYVmKq-xa8A4tXMfZWQ7XHVFQesxAL4cT4jgRA%40mail.gmail.com.


Re: FastCGI with recent Drjango?

2020-12-14 Thread esse garthey
Le 13 déc. 2020 17:09, "Tim Chase"  a écrit
:

> At one point in history long past, Django 1.8 supported FastCGI via
> flup
>
> https://docs.djangoproject.com/en/1.8/howto/deployment/fastcgi/
>
> but it was slated to be removed in 1.9 and there seem to be no
> further docs I can disinter about running Django in a FastCGI
> environment (all other resources I turned up are of a similar
> vintage).
>
> Is there a recommended way to run Django in a FastCGI environment
> these days?
>
> I ask largely because OpenBSD's stock `httpd` supports CGI and
> FastCGI but not WSGI or other such interfaces.  Push come to shove, I
> could end up using relayd/httpd as a fronting proxy to some
> intermediate server (like uWSGI or gunicorn?).  If even that causes
> issues, I *can* switch to nginx, but would prefer to stick with as
> much software in the base install if possible.
>
> Thanks,
>
> -tkc
>
>
>
>
>
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/20201213110941.661cf166%40bigbox.attlocal.net.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACq8Q8cSCTmu69Rs-jPpskDNserBBmV1aVMEFpcO_%2B-0%3D2xTYA%40mail.gmail.com.


Re: How can you do a for loop with a database?

2020-12-14 Thread Peter T
I did not realize it was a dictionary haha

On Monday, December 14, 2020 at 9:53:40 AM UTC-5 Shahprogrammer wrote:

> No it is a dictionary representation of your data
>
> On Monday, 14 December 2020 at 19:55:54 UTC+5:30 prth...@gmail.com wrote:
>
>> is (items) the model name?
>>
>> On Sunday, December 13, 2020 at 8:12:30 AM UTC-5 andrea...@hypercode.se 
>> wrote:
>>
>>> The context needs to be a dictionary.
>>>
>>> Something like this would work:
>>> context = {
>>> ‘items’: Model.objects.all()
>>> }
>>>
>>> Then in the template:
>>> {% for item in items %}
>>>   {{ item.text }}
>>> {% endfor %}
>>>
>>> Here ‘text’ is the property on the database model you want to display.
>>>
>>>
>>> Regards,
>>>
>>>
>>> Andréas
>>>
>>> 12 dec. 2020 kl. 17:11 skrev Peter T :
>>>
>>> Example:
>>>
>>> context = (database model)
>>>
>>> def index(request):
>>>  render(index.html, context)
>>>
>>> HTML Template:
>>>
>>> {% for i in context %}
>>>  { database.text }
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/035bd359-0df5-4d1c-b7b7-f4e08584c288n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/781beced-b456-41bc-b8f7-20ea88367668n%40googlegroups.com.


Re: How can you do a for loop with a database?

2020-12-14 Thread Shahprogrammer
No it is a dictionary representation of your data

On Monday, 14 December 2020 at 19:55:54 UTC+5:30 prth...@gmail.com wrote:

> is (items) the model name?
>
> On Sunday, December 13, 2020 at 8:12:30 AM UTC-5 andrea...@hypercode.se 
> wrote:
>
>> The context needs to be a dictionary.
>>
>> Something like this would work:
>> context = {
>> ‘items’: Model.objects.all()
>> }
>>
>> Then in the template:
>> {% for item in items %}
>>   {{ item.text }}
>> {% endfor %}
>>
>> Here ‘text’ is the property on the database model you want to display.
>>
>>
>> Regards,
>>
>>
>> Andréas
>>
>> 12 dec. 2020 kl. 17:11 skrev Peter T :
>>
>> Example:
>>
>> context = (database model)
>>
>> def index(request):
>>  render(index.html, context)
>>
>> HTML Template:
>>
>> {% for i in context %}
>>  { database.text }
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/035bd359-0df5-4d1c-b7b7-f4e08584c288n%40googlegroups.com
>>  
>> 
>> .
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/29e7360d-bb95-48bc-896d-1ad84c37308an%40googlegroups.com.


Re: How can you do a for loop with a database?

2020-12-14 Thread Peter T
is (items) the model name?

On Sunday, December 13, 2020 at 8:12:30 AM UTC-5 andrea...@hypercode.se 
wrote:

> The context needs to be a dictionary.
>
> Something like this would work:
> context = {
> ‘items’: Model.objects.all()
> }
>
> Then in the template:
> {% for item in items %}
>   {{ item.text }}
> {% endfor %}
>
> Here ‘text’ is the property on the database model you want to display.
>
>
> Regards,
>
>
> Andréas
>
> 12 dec. 2020 kl. 17:11 skrev Peter T :
>
> Example:
>
> context = (database model)
>
> def index(request):
>  render(index.html, context)
>
> HTML Template:
>
> {% for i in context %}
>  { database.text }
>
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/035bd359-0df5-4d1c-b7b7-f4e08584c288n%40googlegroups.com
>  
> 
> .
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e64c96a-c925-4d1b-a49e-75ecedd15276n%40googlegroups.com.


Re: if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object

2020-12-14 Thread Kasper Laudrup

On 14/12/2020 09.38, KUMBHAGIRI SIVAKRISHNA wrote:
ile 
"/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py", 
line 200, in validate_bucket_name

     if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket):
TypeError: expected string or bytes-like object


Please help me to solve this problem



https://stackoverflow.com/help/how-to-ask

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/886570b2-6eee-45ef-83a3-16a8cc939e12%40stacktrace.dk.


if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object

2020-12-14 Thread KUMBHAGIRI SIVAKRISHNA
ile
"/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py",
line 200, in validate_bucket_name
if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket):
TypeError: expected string or bytes-like object


Please help me to solve this problem

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMM5N90eXxofy6AOG54bC%2B_qN1-UcECOR6tKZYdzhhPrgmSecg%40mail.gmail.com.