Thursday, May 31, 2018

Re: Implementing a 'please wait' page

Have you looked at celery (http://www.celeryproject.org/) to handle the long running process? Perhaps in conjunction with redis (https://redis.io/)?

If you passed the long running process to celery, then you could change the page to "say please wait....".

Mark

On Thu, May 31, 2018 at 4:35 PM, Mohammed Noor <snmk195@gmail.com> wrote:
Hello Guys,

I currently have a process running on my django application which takes about 10-15 minutes to complete.

Currently, the user clicks on a 'submit' button and this process starts. The web page remains in a hung state for the complete time this process takes to run and after say 10-15 mins another 'results' page is displayed.


I want to be able to display a page saying 'please wait for <lenght of time taken to complete process>'  after submit button is clicked. Can you please give me any ideas on how to implement this.


Here is a rough representation of my code flow:

Main function ():
    -lots of code
    -call to sub function() //this is the guy taking 10-15 mins to execute
    -if sub function() returns true then proceed else break and exit.
     -remaining code of Main function()

As you might have guessed, I want to be able to change the display when this sub function () is hit. Btw, main function () is executed when user clicks on submit button.


Appreciate your help!

Thanks and Have a great day,
Mohammed Noor

--
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+unsubscribe@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/5CF991C0-FB63-47BA-9A2A-47224E468D0B%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+unsubscribe@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/CAEqej2OTHwsOe5svxqbd31h1NSniROe9pnmbDm%2BN3vPGtUPTSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: dumpdata fails with crytpic error

On 1/06/2018 2:22 PM, Bernd Wechner wrote:
> Just tried this:
>
> |
> $ python3 manage.py dumpdata --format json --indent 4>data.json
> CommandError:Unableto serialize database:'NoneType'objecthas
> noattribute 'is_authenticated'
> |
>
> Anyone seen this before. How does one diagnose this given the vague
> nature of the message? I mean I presume it's complaining because
> there's an illegal value in a field in the database. But you think
> it's mention which field in which model on which record? Is there a
> quick way to find out?

I haven't seen it before but I would say it is your user model.
is_authenticated is an attribute of django.contrib.auth.user (actually
AbstractUser I think).

Don't know whether --verbosity=2 would give you more error info.

Here is mine which does work ...

python manage.py dumpdata --settings=proj.settings.dev --indent=2
--verbosity=0 --natural-primary --natural-foreign --all > dump.json

Note the settings arg which is required for manage.py to find the
correct database if you don't have DJANGO_SETTINGS_MODULE established in
your environment.

Mike

>
> Regards,
>
> Bernd.
> --
> 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+unsubscribe@googlegroups.com
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com
> <mailto: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/32b8f2a7-cbe2-420d-baee-5101e00a7038%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/32b8f2a7-cbe2-420d-baee-5101e00a7038%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 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+unsubscribe@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/3d810e88-9ebb-cb5f-416d-4d0e82c023c9%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

dumpdata fails with crytpic error

Just tried this:

$ python3 manage.py dumpdata --format json --indent 4 > data.json
CommandError: Unable to serialize database: 'NoneType' object has no attribute 'is_authenticated'

Anyone seen this before. How does one diagnose this given the vague nature of the message? I mean I presume it's complaining because there's an illegal value in a field in the database. But you think it's mention which field in which model on which record? Is there a quick way to find out?

Regards,

Bernd.

--
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+unsubscribe@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/32b8f2a7-cbe2-420d-baee-5101e00a7038%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: A Web Developer is currently needed for a contract job in Lagos,Nigeria

Gone though attachment......

On Thu, May 31, 2018 at 10:27 PM, Adefioye Temidayo <temidjoy@gmail.com> wrote:
Hello,
Kindly send in your portfolio

Cheers!

On Thu, May 31, 2018 at 4:32 PM, Rakesh Singh <rakesh8in@gmail.com> wrote:
I am interested for this job. If you need any information please let me know.

On Thu, May 31, 2018 at 1:07 PM, Adefioye Temidayo <temidjoy@gmail.com> wrote:

URGENT A Web Developer is currently needed for a contract job in Lagos,Nigeria Location: 70% remote Pay: #300,000 - #400,000 Preferred: * 3 years+ experience in web development * Python Django * Apache & uWSGI server configuration * Experience with project planning and estimation. * Experience working with Angular 2 or 4 * Relational Databases/SQL: * PostgreSQL * Query creation & optimization * Refactoring code inefficiencies with database operations * Agile Software Development- SCRUM * Test Driven Development and Unit Testing * Continuous Integration * Source control management tools: Mercurial (preferred), Git, SVN.TFS(Team foundation Server) * Experience with Responsive Design If you are interested kindly send your portfolio to temidjoy.adefioye@diylaw.ng

--
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+unsubscribe@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/c09a28d7-a6c6-4de8-9727-8bd39b7de9c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Thanks & Regards

 
Rakesh Singh
Diverse Lynx LLC
Technical Project Manager
786 9230 528
P Please consider your environmental responsibility - think before you print!


--
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+unsubscribe@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/CADJJcgYr2hc2-sy%3DWHccn_mrWRo%3DjGzAwJv-rwRi1uxFPdXgig%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+unsubscribe@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/CAPuT9hv8BHBf8E1oYhVZxe17zxZU%2BF9ZwO8NtE%3DuaWkgJSvmqQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--

Thanks & Regards

 
Rakesh Singh
Diverse Lynx LLC
Technical Project Manager
786 9230 528
P Please consider your environmental responsibility - think before you print!


--
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+unsubscribe@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/CADJJcgYDJEePvBj%2BeZ-AhyLvMN5C-75Or6U7czQzpSWCw5c1Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Implementing a 'please wait' page

Hello Guys,

I currently have a process running on my django application which takes about 10-15 minutes to complete.

Currently, the user clicks on a 'submit' button and this process starts. The web page remains in a hung state for the complete time this process takes to run and after say 10-15 mins another 'results' page is displayed.


I want to be able to display a page saying 'please wait for <lenght of time taken to complete process>' after submit button is clicked. Can you please give me any ideas on how to implement this.


Here is a rough representation of my code flow:

Main function ():
-lots of code
-call to sub function() //this is the guy taking 10-15 mins to execute
-if sub function() returns true then proceed else break and exit.
-remaining code of Main function()

As you might have guessed, I want to be able to change the display when this sub function () is hit. Btw, main function () is executed when user clicks on submit button.


Appreciate your help!

Thanks and Have a great day,
Mohammed Noor

--
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+unsubscribe@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/5CF991C0-FB63-47BA-9A2A-47224E468D0B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: URL Concatenation Issue

In blog/urls.py I have my my homepage mapped to my view.index. Are you saying to also map view.about as well? Also, when you say namespace are you saying to create a dictionary and include my index (blog) and about pages as values? New to Python so I'm trying to still wrap my head around the utilization of python dictionaries.

On Wed, May 30, 2018 at 10:42 PM, Aditya Singh <adityasingh222247@gmail.com> wrote:
For this you have provide an app inside your urls and refer to it as home:about where home is the app name and about is the page to be rendered. Also provide namespace in the urls so that the url is linked to the app name.
Kind Regards,
Aditya

On Thu, May 31, 2018, 7:54 AM Spence Patrick <spence.d.patrick@gmail.com> wrote:
Is your link tag href="./about" or href="/about/"

On Wed, May 30, 2018, 19:14 <johnregis021@gmail.com> wrote:
Hello,

I'm debugging an issue that I'm having with my URL patterns. In my HTML I have an "about me" page that is linking to an about.html file in my templates/blog/ directory. When I load the homepage and click on the "about me" link than "domain.com/about/" loads, which matches the URL pattern in my blog/urls.py file, and the page renders perfectly fine.

However, while on the "about me" page I can't link to any other page because the URL pattern starts to concatenate instead of overwrite (if that makes any sense). For example, if I click on "about me" again than Django tries to load domain.com/about/about and I get an error.

I'm using a python 3.5.2 venv and I'm running Django 2.0.5. I'm new to programming by the way (to include Python, Django, HTML/CSS).

--
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+unsubscribe@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/1213b3f9-c74b-4af9-b585-61f2423720f0%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+unsubscribe@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/CAD6-5Ch7%3DSTQGPdPg3iU%3Dvy2H1GMqcFnycBqb5bquXGDDV6ZBA%40mail.gmail.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/UB1iqDXjy3g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@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/CAEPfumjqtuz9bTfh%2Bfk%3D8iFYOKUQwSGpQqwwuyqX%2BQ%3DABgL3%3Dw%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+unsubscribe@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%2BtE7VRZfAQo58YojBDg0WShaM3h2PBu3B5-VHKyXKP870HYkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: URL Concatenation Issue

I have href="about/". Also tried href="./about/" and same result.

On Wed, May 30, 2018 at 10:23 PM, Spence Patrick <spence.d.patrick@gmail.com> wrote:
Is your link tag href="./about" or href="/about/"

On Wed, May 30, 2018, 19:14 <johnregis021@gmail.com> wrote:
Hello,

I'm debugging an issue that I'm having with my URL patterns. In my HTML I have an "about me" page that is linking to an about.html file in my templates/blog/ directory. When I load the homepage and click on the "about me" link than "domain.com/about/" loads, which matches the URL pattern in my blog/urls.py file, and the page renders perfectly fine.

However, while on the "about me" page I can't link to any other page because the URL pattern starts to concatenate instead of overwrite (if that makes any sense). For example, if I click on "about me" again than Django tries to load domain.com/about/about and I get an error.

I'm using a python 3.5.2 venv and I'm running Django 2.0.5. I'm new to programming by the way (to include Python, Django, HTML/CSS).

--
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+unsubscribe@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/1213b3f9-c74b-4af9-b585-61f2423720f0%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/UB1iqDXjy3g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@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/CAD6-5Ch7%3DSTQGPdPg3iU%3Dvy2H1GMqcFnycBqb5bquXGDDV6ZBA%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+unsubscribe@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%2BtE7VRQvg2_fir6merUXc1dzzMnupdnbBypTQyguwErLycuFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

one-to-one GenericRelation best practices

Hello! This is my first question, so please excuse any mistakes.

I'm using django 1.8 (working on migration to 2.0).

I need to implement a one-to-one generic relation. To illustrate suppose I have three classes, the first representing and abstract class in a store and the other specific products which need extra information:


AbstractProduct(models.Model):
    <fields here>
    sale = GenericRelation('Sales')
    class Meta:
        abstract = True

Books(AbstractProduct):
    <fields here>

Magazines(AbstractProduct):
    <fields here>


Now I need to create a models for 'Sales'. Each sale is of a specific product. Following https://docs.djangoproject.com/en/2.0/ref/contrib/contenttypes/#generic-relations I used:

class Sales(models.Model):
    <fields here>
    content_type = models.ForeignKey(...)
    object_id = models.PositiveIntegerField(...)
    content_object = GenericForeignKey('content_type', 'object_id')


My problem is that by using this approach whenever I do

>>> Books.objects.get(pk=1).sale

I get back a manager since django does not know it is a one-to-one relation. And it makes me think that maybe I'm approaching this in the wrong way.

My question is:
(a) is this design a good solution for this problem? Is there a better approach? Has anyone solved a similar problem in a better way?
(b) is there a way to create a generic One-To-One relation?

I'm open to answers pointing to good blogs/books/articles which give a more formal approach to this kind of design issue, if you know a good one.

Thanks in advance! Yours,

Vitor.


--
Vitor Quintanilha Barbosa

--
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+unsubscribe@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/CAB-MUC7h4S32XE8nj7%2BtpeYdv%3DtH%3DQBX3ghx0rVxU%2BF0mTAakg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: A Web Developer is currently needed for a contract job in Lagos,Nigeria

On 5/31/18, Adefioye Temidayo <temidjoy@gmail.com> wrote:
> Hello,
> Kindly send in your portfolio
>
> Cheers!
>
> On Thu, May 31, 2018 at 4:32 PM, Rakesh Singh <rakesh8in@gmail.com> wrote:
>
>> I am interested for this job. If you need any information please let me
>> know.
>>
>> On Thu, May 31, 2018 at 1:07 PM, Adefioye Temidayo <temidjoy@gmail.com>
>> wrote:
>>
>>>
>>> URGENT A Web Developer is currently needed for a contract job in
>>> Lagos,Nigeria Location: 70% remote Pay: #300,000 - #400,000 Preferred: *
>>> 3
>>> years+ experience in web development * Python Django * Apache & uWSGI
>>> server configuration * Experience with project planning and estimation.
>>> *
>>> Experience working with Angular 2 or 4 * Relational Databases/SQL: *
>>> PostgreSQL * Query creation & optimization * Refactoring code
>>> inefficiencies with database operations * Agile Software Development-
>>> SCRUM
>>> * Test Driven Development and Unit Testing * Continuous Integration *
>>> Source control management tools: Mercurial (preferred), Git,
>>> SVN.TFS(Team
>>> foundation Server) * Experience with Responsive Design If you are
>>> interested kindly send your portfolio to temidjoy.adefioye@diylaw.ng
>>>
>>> --
>>> 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+unsubscribe@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/ms
>>> gid/django-users/c09a28d7-a6c6-4de8-9727-8bd39b7de9c7%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/c09a28d7-a6c6-4de8-9727-8bd39b7de9c7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> *Thanks & Regards*
>>
>> *Rakesh Singh*
>> *Diverse Lynx LLC*
>> *Technical Project Manager*
>> *786 9230 528*
>> *rakesh8in@gmail.com <rakesh8in@gmail.com>*
>> P Please consider your environmental responsibility - think before you
>> print!
>>
>>
>> --
>> 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+unsubscribe@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/CADJJcgYr2hc2-sy%3DWHccn_mrWRo%3DjGzAwJv-
>> rwRi1uxFPdXgig%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CADJJcgYr2hc2-sy%3DWHccn_mrWRo%3DjGzAwJv-rwRi1uxFPdXgig%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> 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+unsubscribe@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/CAPuT9hv8BHBf8E1oYhVZxe17zxZU%2BF9ZwO8NtE%3DuaWkgJSvmqQ%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+unsubscribe@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/CANuqdaWhx2S79eobY2Y95wOGxmgcMy%3DZv0QXzXR-1aA6WeEnrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: A Web Developer is currently needed for a contract job in Lagos,Nigeria

Hello,
Kindly send in your portfolio

Cheers!

On Thu, May 31, 2018 at 4:32 PM, Rakesh Singh <rakesh8in@gmail.com> wrote:
I am interested for this job. If you need any information please let me know.

On Thu, May 31, 2018 at 1:07 PM, Adefioye Temidayo <temidjoy@gmail.com> wrote:

URGENT A Web Developer is currently needed for a contract job in Lagos,Nigeria Location: 70% remote Pay: #300,000 - #400,000 Preferred: * 3 years+ experience in web development * Python Django * Apache & uWSGI server configuration * Experience with project planning and estimation. * Experience working with Angular 2 or 4 * Relational Databases/SQL: * PostgreSQL * Query creation & optimization * Refactoring code inefficiencies with database operations * Agile Software Development- SCRUM * Test Driven Development and Unit Testing * Continuous Integration * Source control management tools: Mercurial (preferred), Git, SVN.TFS(Team foundation Server) * Experience with Responsive Design If you are interested kindly send your portfolio to temidjoy.adefioye@diylaw.ng

--
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+unsubscribe@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/c09a28d7-a6c6-4de8-9727-8bd39b7de9c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Thanks & Regards

 
Rakesh Singh
Diverse Lynx LLC
Technical Project Manager
786 9230 528
P Please consider your environmental responsibility - think before you print!


--
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+unsubscribe@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/CADJJcgYr2hc2-sy%3DWHccn_mrWRo%3DjGzAwJv-rwRi1uxFPdXgig%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+unsubscribe@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/CAPuT9hv8BHBf8E1oYhVZxe17zxZU%2BF9ZwO8NtE%3DuaWkgJSvmqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: A Web Developer is currently needed for a contract job in Lagos,Nigeria

I am interested for this job. If you need any information please let me know.

On Thu, May 31, 2018 at 1:07 PM, Adefioye Temidayo <temidjoy@gmail.com> wrote:

URGENT A Web Developer is currently needed for a contract job in Lagos,Nigeria Location: 70% remote Pay: #300,000 - #400,000 Preferred: * 3 years+ experience in web development * Python Django * Apache & uWSGI server configuration * Experience with project planning and estimation. * Experience working with Angular 2 or 4 * Relational Databases/SQL: * PostgreSQL * Query creation & optimization * Refactoring code inefficiencies with database operations * Agile Software Development- SCRUM * Test Driven Development and Unit Testing * Continuous Integration * Source control management tools: Mercurial (preferred), Git, SVN.TFS(Team foundation Server) * Experience with Responsive Design If you are interested kindly send your portfolio to temidjoy.adefioye@diylaw.ng

--
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+unsubscribe@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/c09a28d7-a6c6-4de8-9727-8bd39b7de9c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Thanks & Regards

 
Rakesh Singh
Diverse Lynx LLC
Technical Project Manager
786 9230 528
P Please consider your environmental responsibility - think before you print!


--
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+unsubscribe@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/CADJJcgYr2hc2-sy%3DWHccn_mrWRo%3DjGzAwJv-rwRi1uxFPdXgig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: href not working

On donderdag 31 mei 2018 15:49:28 CEST Caleb Bryson wrote:
> my blog view.py is empty at the moment
>
>
> Mysite url.py
>
> from django.contrib import admin
>
> from django.conf.urls import url, include
>
>
>
> urlpatterns = [
>
> url(r'^admin/', admin.site.urls),
>
> url(r'^', include( 'hybridair.urls')),

This matches anything that has a beginning. So that always matches, anything
after it, is ignored (Django works on first match base).


> url(r'^', views.index, name='index'),

And again.

So anything that is not admin, goes to the homepage.
--
Melvyn Sopacua

--
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+unsubscribe@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/2507550.5rhCOJ8Mzy%40fritzbook.
For more options, visit https://groups.google.com/d/optout.

calculate the followers difference/grow by day

 
Hey guys,

I´m using SQLite and trying to calculate the followers difference by day

This is my model:

class Statistics(models.Model):
    followers = models.IntegerField()
    last_update = models.DateTimeField(auto_now_add=True)

This are my database rows:

"6" "50" "2018-05-29 00:25:48.276102"
"1" "100" "2018-05-29 00:26:48.276102"
"3" "200" "2018-05-30 00:27:04.178444"
"5" "250" "2018-05-30 00:30:04.178444"
"4" "300" "2018-05-31 00:27:04.178444"

And the result I´m tryting to achieve is:

followers | last_update
150          2018-05-30
50           2018-05-31

# I´m new to Django and thinking about use a Manager, but don't know if´s doable using a Manager
# Does anyone has a suggestion ?

--
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+unsubscribe@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/3196a628-a53f-41ac-bcbf-6cc8b8a66016%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: href not working

my blog view.py is empty at the moment


Mysite url.py

from django.contrib import admin

from django.conf.urls import url, include

 

urlpatterns = [

    url(r'^admin/', admin.site.urls),

    url(r'^', include( 'hybridair.urls')),

    url(r'^blog/$', include( 'blog.urls')),

]

 

 

 

Hybrid Air url.py

from django.conf.urls import url, include

from . import views

urlpatterns = [

    url(r'^', views.index, name='index'),

    url(r'^contact/', views.contact, name='contact'),

]

 

 

Hybrid Air view.py

from django.shortcuts import render

 

def index(request):

    return render(request, 'hybridair/home.html')

 

def contact(request):

    return render(request, 'hybridair/basic.html' ('content' ['contact the team at''marcus@flymat21.com']))

 

def blog(request):

    return render(request, 'hybridair/header.html')

 

 

 

 

 

blog url.py

from django.conf.urls import url, include

from django.views.generic import ListView, DetailView

from blog.models import Post

 

urlpatterns = [

    url(r'^$', ListView.as_view(

    queryset=Post.objects.order_by('-date')[:25],

    template_name="blog/blog.html")),

 

    url(r'^(?P<pk>\d+)$', DetailView.as_view(model = Post,

    template_name='blog/post.html')),

    ]


Do you see what I need to change?

On Thursday, May 31, 2018 at 9:01:23 AM UTC-4, Melvyn Sopacua wrote:
On donderdag 31 mei 2018 05:56:59 CEST Caleb Bryson wrote:
> So i am trying to create a directory with a Home,Blog,and Contact
> selection. But every time i click on one of them they all go back to the
> home page.

If the url in your addressbar is /blog/  after clickin on it, but you see the
homepage content, then your homepage url pattern matches too much.

If you get redirected to the homepage, then there's something wrong in your
blog view code.

Given that it applies to both contact and blog, the first option is more
likely, but you could be making the same mistake in both views.

--
Melvyn Sopacua

--
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+unsubscribe@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/2ed614e4-cb26-47ef-9bfb-4e07d10b5ef2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: href not working

my blog view.py is empty at the moment


Mysite url.py

from django.contrib import admin

from django.conf.urls import url, include

 

urlpatterns = [

    url(r'^admin/', admin.site.urls),

    url(r'^', include( 'hybridair.urls')),

    url(r'^blog/$', include( 'blog.urls')),

]

 

 

 

Hybrid Air url.py

from django.conf.urls import url, include

from . import views

urlpatterns = [

    url(r'^', views.index, name='index'),

    url(r'^contact/', views.contact, name='contact'),

]

 

 

Hybrid Air view.py

from django.shortcuts import render

 

def index(request):

    return render(request, 'hybridair/home.html')

 

def contact(request):

    return render(request, 'hybridair/basic.html' ('content' ['contact the team at', 'marcus@flymat21.com']))

 

def blog(request):

    return render(request, 'hybridair/header.html')

 

 

 

 

 

blog url.py

from django.conf.urls import url, include

from django.views.generic import ListView, DetailView

from blog.models import Post

 

urlpatterns = [

    url(r'^$', ListView.as_view(

    queryset=Post.objects.order_by('-date')[:25],

    template_name="blog/blog.html")),

 

    url(r'^(?P<pk>\d+)$', DetailView.as_view(model = Post,

    template_name='blog/post.html')),

    ]


Do you see what I need to change?
On Thursday, May 31, 2018 at 4:31:47 AM UTC-4, Mike Dewhirst wrote:
On 31/05/2018 1:56 PM, Caleb Bryson wrote:
> So i am trying to create a directory with a Home,Blog,and Contact
> selection. But every time i click on one of them they all go back to
> the home page.

It feels like your urls.py is insufficiently fleshed out or maybe your
home page url isn't fully formed. Django obviously thinks that whatever
is handed in can be interpreted as requesting the home page view.

For example, I would expect your home page url pattern (url or re_path
depending on Django version) might look something like ...

url_patterns = [
     url(r'^$', home_page_view),
     ...
]

If you have omitted that $ anything will match and your home page view
will be called.

Just a guess


> How do i fix this, and here is the secton of code below. let me know
> if you need to see more
>
> <div class="well bs-sidebar" id="sidebar" style="background-color:#fff">
> <ol class="nav nav-pills nav-stacked">
> <li><a href='/'>Home</a></li>
> <li><a href='/blog/'>Blog</a></li>
> <li><a href='/contact/'>Contact</a></li>
> </ol>
> </div>
> --
> 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
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto: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/9dc7004b-4fff-412d-8560-6308f13db92c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9dc7004b-4fff-412d-8560-6308f13db92c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 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+unsubscribe@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/1fb184b5-04e1-4592-90b4-bafaa4809dbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.