Search Results

Search found 6498 results on 260 pages for 'indexed views'.

Page 2/260 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Django: Breaking up views

    - by Brant
    This is really just a "best practices" question... I find that When developing an app, I often end up with a lot of views. Is it common practice to break these views up into several view files? In other words... instead of just having views.py, is it common to have views_1.py, views_2.py, views_3.py (but named more appropriately, perhaps by category)?

    Read the article

  • multiple partial views mvc 2

    - by nik1
    Hello World! Hi guys, I have a master page with two partial viewson it both of which submit to the AccountController. When I click Submit on either of the partial views the following happens: If I declare the partial views like Html.BeginForm("PartialAction1","Account") it redirects to that partial view on clicking submit instead bringing back the default HomeContoller Index view with validation errors. If I declare the partial view forms as Html.BeginForm() then it returns to the default index view of the home controller. But it actually fires both partial view actions inside the AccountController and thus returns validation errors for both partial views simultaneously. What I want is version 2 above with only one action firing instead of two. Am I missing, hopefully, something very simple? I hoping someone can help me or point me in the right direction. Here's the code from my master page for the partial views Html.Action("Login1","Account") Html.Action("Login2", "Account") Many Thanks!

    Read the article

  • Switching between landscape views

    - by Isacco
    What is the best way to switch between views that are both in Landscape mode? I've tried with a simple "Push and Pop" methods that work fine when I try them with Portrait views but when I do it with Landscape for some reason it does the switching like the method was supposed to work just for Portrait views and a the end of the switch it autorotates back to Landscape.... if anyone can help that would be greatly appreciated. Thanks in advance.

    Read the article

  • django {% tag %} problem

    - by Sevenearths
    I don't know if its me but {% tag ??? %} has bee behaving a bit sporadically round me (django ver 1.2.3). I have the following main.html file: <html> {% include 'main/main_css.html' %} <body> test! <a href="{% url login.views.logout_view %}">logout</a> test! <a href="{% url client.views.client_search_last_name_view %}">logout</a> </body> </html> with the urls.py being: from django.conf.urls.defaults import * import settings from login.views import * from mainapp.views import * from client.views import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^weclaim/', include('weclaim.foo.urls')), (r'^login/$', 'login.views.login_view'), (r'^logout/$', 'login.views.logout_view'), (r'^$', 'mainapp.views.main_view'), (r'^client/search/last_name/(A-Za-z)/$', 'client.views.client_search_last_name_view'), #(r'^client/search/post_code/(A-Za-z)/$', 'client.views.client_search_last_name_view'), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), (r'^static/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}), ) and the views.py for login being: from django.shortcuts import render_to_response, redirect from django.template import RequestContext from django.contrib import auth import mainapp.views def login_view(request): if request.method == 'POST': uname = request.POST.get('username', '') psword = request.POST.get('password', '') user = auth.authenticate(username=uname, password=psword) # if the user logs in and is active if user is not None and user.is_active: auth.login(request, user) return redirect(mainapp.views.main_view) else: return render_to_response('loginpage.html', {'login_failed': '1',}, context_instance=RequestContext(request)) else: return render_to_response('loginpage.html', {'dave': '1',}, context_instance=RequestContext(request)) def logout_view(request): auth.logout(request) return render_to_response('loginpage.html', {'logged_out': '1',}, context_instance=RequestContext(request)) and the views.py for clients being: from django.shortcuts import render_to_response, redirect from django.template import RequestContext import login.views def client_search_last_name_view(request): if request.user.is_authenticated(): return render_to_response('client/client_search_last_name.html', {}, context_instance=RequestContext(request)) else: return redirect(login.views.login_view) Yet when I login it django raises an 'NoReverseMatch' for {% url client.views.client_search_last_name_view %} but not for {% url login.views.logout_view %} Now why would this be?

    Read the article

  • Google Webmaster Tools Index Status is 0 but sitemap URL shows indexed

    - by DD.
    I've added my site to Google Webmaster tools www.medexpress.co.uk. The site was submitted a few weeks ago. The index status shows 0 but it shows 6 URLs have been indexed in the sitemaps section. If I search in google I can see that the site is indexed and several pages appear: https://www.google.co.uk/search?q=site%3Awww.medexpress.co.uk&oq=site%3Awww.medexpress.co.uk&sourceid=chrome&ie=UTF-8 My question is why is the index status 0 when the sitemap section shows several indexed pages and also the pages appear in the search engine.

    Read the article

  • How to test views in ASP.NET MVC2 (ala RSpec)

    - by Dmitriy Nagirnyak
    Hi, I am really missing heavily the ability to test Views independently of controllers. The way RSpec allows to do it. What I want to do is to perform assertions on the rendered view (where no controller is involved!). In order to do so I should provide required Model, ViewData and maybe some details from HttpContextBase (when will we get rid of HttpContext!). So far I have not found anything that allows doing it. Also it might heavily depend on the ViewEngine being used. List of things that views might contain are: Partial views (may be nested deeply). Master pages (or similar in other view engines). Html helpers generating links and other elements. Generally almost anything in a range of common sense :) . Also please note that I am not talking about client-side testing and thus Selenium is just not related to it at all. It is just plain .NET testing. So are there any options to actually do the testing of views? Thanks, Dmitriy.

    Read the article

  • Test Views in ASP.NET MVC2 (ala RSpec)

    - by Dmitriy Nagirnyak
    Hi, I am really missing heavily the ability to test Views independently of controllers. The way RSpec does it. What I want to do is to perform assertions on the rendered view (where no controller is involved!). In order to do so I should provide required Model, ViewData and maybe some details from HttpContextBase (when will we get rid of HttpContext!). So far I have not found anything that allows doing it. Also it might heavily depend on the ViewEngine being used. List of things that views might contain are: Partial views (may be nested deeply). Master pages (or similar in other view engines). Html helpers generating links and other elements. Generally almost anything in a range of common sense :) . Also please note that I am not talking about client-side testing and thus Selenium is just not related to it at all. It is just plain .NET testing. So are there any options to actually do the testing of views? Thanks, Dmitriy.

    Read the article

  • DRYing up Rails Views with Nested Resources

    - by viatropos
    What is your solution to the problem if you have a model that is both not-nested and nested, such as products: a "Product" can belong_to say an "Event", and a Product can also just be independent. This means I can have routes like this: map.resources :products # /products map.resources :events do |event| event.resources :products # /events/1/products end How do you handle that in your views properly? Note: this is for an admin panel. I want to be able to have a "Create Event" page, with a side panel for creating tickets (Product), forms, and checking who's rsvp'd. So you'd click on the "Event Tickets" side panel button, and it'd take you to /events/my-new-event/tickets. But there's also a root "Products" tab for the admin panel, which could list tickets and other random products. The 'tickets' and 'products' views look 90% the same, but the tickets will have some info about the event it belongs to. It seems like I'd have to have views like this: products/index.haml products/show.haml events/products/index.haml events/products/show.haml But that doesn't seem DRY. Or I could have conditionals checking to see if the product had an Event (@product.event.nil?), but then the views would be hard to understand. How do you deal with these situations? Thanks so much.

    Read the article

  • Strategies for Mapping Views in NHibernate

    - by Nathan Fisher
    It seems that NHibernate needs to have an id tag specified as part of the mapping. This presents a problem for views as most of the time (in my experience) a view will not have an Id. I have mapped views before in nhibernate, but they way I did it seemed to be be messy to me. Here is a contrived example of how I am doing it currently. Mapping <class name="ProductView" table="viewProduct" mutable="false" > <id name="Id" type="Guid"> <generator class="guid.comb" /> </id> <property name="Name" /> <!-- more properties --> </class> View SQL Select NewID() as Id, ProductName as Name, --More columns From Product Class public class ProductView { public virtual Id {get; set;} public virtual Name {get; set;} } I don't need an Id for the product or in the case of some views I may not have an id for the view, depending on if I have control over the View Is there a better way of mapping views to objects in nhibernate?

    Read the article

  • Storing ASP.Net MVC Views in the Database

    - by Adam Albrecht
    For an ASP.Net MVC application, I'm interested in storing some views and/or partial views in the database so that a few semi-technical users can do some basic view logic. Does anyone have any tips or lessons from experience on doing this? I know Phil Haack wrote a blog post on this about a year ago. He used IronRuby for scripting his views, (which would be fine for me). He created a quick proof-of-concept, but I can't find any other information on the topic. Any ideas, thoughts, tips, etc would be appreciated. Thanks!

    Read the article

  • How do views reduce code duplication?

    - by Debuger
    Hi! I read something like this about db views: Views are incredibly powerful and useful for one reason that stands out above all the other very good reasons. They reduce code duplication. That is, in most cases, the bottom line. If a query will be used in three or more places, then a view will drastically simplify your changes if the schema or query parameters change. I once had to edit 22 stored procedures to change some query logic. If the original architecture had utilized views, then I would have had only three changes. Can anyone explain to me how it works, and maybe give me some examples? Best regards!

    Read the article

  • Embedded strongly-typed views with ASP.NET MVC

    - by Brian Vallelunga
    I'm working on a plugin-type of system for ASP.NET MVC that loads views from an embedded assembly. I have created a VirtualPathProvider that does the work of retrieving out of the assembly. Everything is working fine except for strongly-typed views. Whenever I try to load one of those, I get an exception of: Could not load type 'System.Web.Mvc.ViewPage'. The problem is that there is no Web.config file under the Views folder. Well, actually there is, but the system doesn't seem to want to read the embedded version. If I manually create the file under the corresponding directory in the web app, everything is fine. This isn't an acceptable workaround however, as each plugin would need its own file in its own specific directory. Does anyone know how I might get ASP to read the embedded Web.config file? Thanks, Brian

    Read the article

  • Drupal, Views: header doesn't accept PHP..

    - by Patrick
    hi, I'm using Views for some nodes, and I want to display a different View title according to which taxonomy tags are selected in my filter. I already have taxonomy field for each node in my view. But this is not what I need. I basically need to display all the currently filtered tags on the top of my view. I was wondering if I can solve adding some line with php, how ? Thanks Update: I'm now using the Views Header field in Views settings, but it only processes html code, not php, so I cannot add taxonomy terms. Is it because of my CCK Editor settings ? thanks

    Read the article

  • 10 Tips to Get Your Website Indexed Quickly

    When your website is design process is completed and the site is ready to go live, your next big goal will be to get your website indexed with search engines as quickly as possible. Using these tips your site can get indexed by search engines rapidly without too much stress or exertion.

    Read the article

  • Get Your Site Indexed Faster With 5 Easy-To-Follow SEO Tips

    Getting traffic from search engines is free and that is why so many people choose to optimize their websites and increase their chances of ranking well. But before you get those good rankings, you need to get your website indexed. Here are 5 easy steps you can follow that will get your website indexed in no time.

    Read the article

  • How to Get Indexed in Google Fast

    Is your site listed or indexed in Google? If not then you need to get it indexed fast as Google accounts for some 90% of all internet searches. So without being in Google you might as well pack up and go home right now.

    Read the article

  • How to Get a Website Indexed by Google in 24 Hours

    Many people have a hard time getting new websites in the search engines. For most people, getting a new site indexed is extremely important, since they may have to rely on the free search engine traffic in the beginning to get their site going. In this article I will go over some strategies that I use to get my new websites indexed by Google within a day or so.

    Read the article

  • How Many Web Pages Should Be Indexed?

    Search engines are crawling websites around the clock for unique web pages and content.Google has always been on the top in indexing deep-links of any website, Google indexed 26 million pages in 1998 and in past 10 years Google have indexed over 1 trillion pages. So, this gives a fair idea that how big this cyber world is.

    Read the article

  • How Many Web Pages Should Be Indexed?

    Search engines are crawling websites around the clock for unique web pages and content.Google has always been on the top in indexing deep-links of any website, Google indexed 26 million pages in 1998 and in past 10 years Google have indexed over 1 trillion pages. So, this gives a fair idea that how big this cyber world is.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >